aboutsummaryrefslogtreecommitdiffstats
path: root/pugl_cairo_test.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-07-21 17:03:43 +0200
committerDavid Robillard <d@drobilla.net>2019-07-21 17:24:42 +0200
commitfa4b48b517bd7b96cb978fb68b974895502c005a (patch)
treeefdeaabbb6299dca6d02993098828e6ebdfc807e /pugl_cairo_test.c
parent35c050fb64f98bdc2be0f779d40eb582ff6b8c97 (diff)
downloadpugl-fa4b48b517bd7b96cb978fb68b974895502c005a.tar.gz
pugl-fa4b48b517bd7b96cb978fb68b974895502c005a.tar.bz2
pugl-fa4b48b517bd7b96cb978fb68b974895502c005a.zip
Gracefully handle failure to create window
Diffstat (limited to 'pugl_cairo_test.c')
-rw-r--r--pugl_cairo_test.c5
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) {