diff options
Diffstat (limited to 'examples/opengl/hellowindow/hellowindow.cpp')
-rw-r--r-- | examples/opengl/hellowindow/hellowindow.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/opengl/hellowindow/hellowindow.cpp b/examples/opengl/hellowindow/hellowindow.cpp index 8076b5a4bb..32732f72b6 100644 --- a/examples/opengl/hellowindow/hellowindow.cpp +++ b/examples/opengl/hellowindow/hellowindow.cpp @@ -63,6 +63,9 @@ void HelloWindow::updateColor() void HelloWindow::render() { + if (!glContext()) + return; + glContext()->makeCurrent(); glClearColor(0.1f, 0.1f, 0.2f, 1.0f); |