summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-08-29 16:19:09 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-09-05 10:55:11 +0000
commite29b72384b66ac5fba3b287c8f6a3376d0aff852 (patch)
tree78a807b7aa434e011d8455700ccabb0cf428bbd5 /examples
parentb3717fc7f01ae078faf066538ddc80fca016ef0c (diff)
Hello GL2 example: Fix exit crash
Bail out of cleanup() when run 2nd time. Task-number: QTBUG-60626 Change-Id: I8a9be2fcfb0e8a5584ce8ed7952affff24bd2a33 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
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;