diff options
author | David Robillard <d@drobilla.net> | 2019-02-17 20:48:49 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-02-17 20:48:49 +0100 |
commit | 51dcb00d5a5e6874f1e83d9cafb9ca2c1bd8bbf7 (patch) | |
tree | 68ed9d640c76be498cb8b055c0d37eff6e516b4c | |
parent | 64f4befecee11e9a3ebd92448e29786992873ecb (diff) | |
download | pugl-51dcb00d5a5e6874f1e83d9cafb9ca2c1bd8bbf7.tar.gz pugl-51dcb00d5a5e6874f1e83d9cafb9ca2c1bd8bbf7.tar.bz2 pugl-51dcb00d5a5e6874f1e83d9cafb9ca2c1bd8bbf7.zip |
Gracefully handle failure to create window in pugl_test
-rw-r--r-- | pugl_test.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pugl_test.c b/pugl_test.c index de61f61..eaf95f8 100644 --- a/pugl_test.c +++ b/pugl_test.c @@ -241,7 +241,9 @@ main(int argc, char** argv) puglIgnoreKeyRepeat(view, ignoreKeyRepeat); puglSetEventFunc(view, onEvent); - puglCreateWindow(view, "Pugl Test"); + if (puglCreateWindow(view, "Pugl Test")) { + return 1; + } puglEnterContext(view); glEnable(GL_DEPTH_TEST); |