From 51dcb00d5a5e6874f1e83d9cafb9ca2c1bd8bbf7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 17 Feb 2019 20:48:49 +0100 Subject: Gracefully handle failure to create window in pugl_test --- pugl_test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- cgit v1.2.1