summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/opengl/hellogl2/glwidget.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/opengl/hellogl2/glwidget.cpp b/examples/opengl/hellogl2/glwidget.cpp
index f9518ffac5..318adb5043 100644
--- a/examples/opengl/hellogl2/glwidget.cpp
+++ b/examples/opengl/hellogl2/glwidget.cpp
@@ -128,6 +128,8 @@ void GLWidget::setZRotation(int angle)
void GLWidget::cleanup()
{
+ if (m_program == nullptr)
+ return;
makeCurrent();
m_logoVbo.destroy();
delete m_program;