From fa4b48b517bd7b96cb978fb68b974895502c005a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 21 Jul 2019 17:03:43 +0200 Subject: Gracefully handle failure to create window --- pugl_cairo_test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pugl_cairo_test.c b/pugl_cairo_test.c index 3837d48..4f4aaa3 100644 --- a/pugl_cairo_test.c +++ b/pugl_cairo_test.c @@ -190,7 +190,10 @@ main(int argc, char** argv) puglIgnoreKeyRepeat(view, ignoreKeyRepeat); puglSetEventFunc(view, onEvent); - puglCreateWindow(view, "Pugl Test"); + if (puglCreateWindow(view, "Pugl Test")) { + return 1; + } + puglShowWindow(view); while (!quit) { -- cgit v1.2.1