diff options
author | David Robillard <d@drobilla.net> | 2019-07-21 17:03:43 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-07-21 17:24:42 +0200 |
commit | fa4b48b517bd7b96cb978fb68b974895502c005a (patch) | |
tree | efdeaabbb6299dca6d02993098828e6ebdfc807e | |
parent | 35c050fb64f98bdc2be0f779d40eb582ff6b8c97 (diff) | |
download | pugl-fa4b48b517bd7b96cb978fb68b974895502c005a.tar.gz pugl-fa4b48b517bd7b96cb978fb68b974895502c005a.tar.bz2 pugl-fa4b48b517bd7b96cb978fb68b974895502c005a.zip |
Gracefully handle failure to create window
-rw-r--r-- | pugl_cairo_test.c | 5 |
1 files changed, 4 insertions, 1 deletions
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) { |