From 59ded5cce47986ac941c437fbf972b1da581da05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 2 May 2011 12:00:00 +0200 Subject: Implemented close event for QWindow and QWidgetWindow. --- examples/opengl/hellowindow/hellowindow.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'examples/opengl') 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); -- cgit v1.2.3