summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/qgl/tst_qgl.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp
index ebbfbae..a0b8b5d 100644
--- a/tests/auto/qgl/tst_qgl.cpp
+++ b/tests/auto/qgl/tst_qgl.cpp
@@ -81,6 +81,8 @@ private slots:
void stackedFBOs();
void colormap();
void fboFormat();
+
+ void testDontCrashOnDanglingResources();
};
tst_QGL::tst_QGL()
@@ -1513,5 +1515,16 @@ void tst_QGL::fboFormat()
QVERIFY(format1c != format4c);
}
+void tst_QGL::testDontCrashOnDanglingResources()
+{
+ // We have a number of Q_GLOBAL_STATICS inside the QtOpenGL
+ // library. This test is verify that we don't crash as a result of
+ // them calling into libgl on application shutdown.
+ QWidget *widget = new UnclippedWidget();
+ widget->show();
+ qApp->processEvents();
+ widget->hide();
+}
+
QTEST_MAIN(tst_QGL)
#include "tst_qgl.moc"