summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2015-02-23 21:15:08 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2015-02-24 13:18:38 +0000
commitedd555425a08f9e074f0a4d9333862636ccaae8d (patch)
treec6bda1203557d8cc45d3f662f120ee9c9869234b /src/widgets
parente9d07be949cb42ed84d6b82f64ad8d74368216ae (diff)
QtOpenGL: avoid crashing if creating a QGLContext sharing with the global QOpenGLContext
If one asks for the global OpenGL context via the right attribute, and then creates a QGLContext sharing with that context, Qt will create anoter, dummy QGLContext owned by the global context. At application shutdown, and specifically after ~QObject of QGuiApplication has run, the QObjectPrivate dpointer gets destroyed. That destroys the owning global QOpenGLContext, and therefore that dummy QGLContext as well. However, QGLContext dtor triggers a code path that accesses qApp as if it were still alive. That's not the case any more -- it has already been destroyed. So, introduce a check and avoid dereferencing NULL. Task-number: QTBUG-44621 Change-Id: Ic160ac99e9269db999e76229b1c7f8c53bd2be61 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/widgets')
0 files changed, 0 insertions, 0 deletions