summaryrefslogtreecommitdiffstats
path: root/examples/opengl/hellowindow
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-05-02 12:00:00 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-05-02 12:00:00 +0200
commit59ded5cce47986ac941c437fbf972b1da581da05 (patch)
tree22cb3c50df76c842bc95d79a60289045bd199508 /examples/opengl/hellowindow
parent3edff16c872fe7abe87007ba2ec78467f35430a9 (diff)
Implemented close event for QWindow and QWidgetWindow.
Diffstat (limited to 'examples/opengl/hellowindow')
-rw-r--r--examples/opengl/hellowindow/hellowindow.cpp3
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);