summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qopenglcontext_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-09-08 09:23:34 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-09-22 14:15:29 +0000
commiteecc351c5d05989c1b0ea3349f76a579b83eb446 (patch)
treee3a6fd57da7756a02a3127f9efabff0f203fb356 /src/gui/kernel/qopenglcontext_p.h
parent9e81fb4df6809bb2ff909af595ac9e2487760181 (diff)
Null out QOpenGLContext::screen upon screen disconnect
Returning a dangling pointer is no good. Do what QOffscreenSurface does: just null it out. Task-number: QTBUG-42803 Change-Id: I01a6db9ae8974a1c78157ebc67097c8dac3a6b6e Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/gui/kernel/qopenglcontext_p.h')
-rw-r--r--src/gui/kernel/qopenglcontext_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h
index f9f3ce2c5f..4a746bf12b 100644
--- a/src/gui/kernel/qopenglcontext_p.h
+++ b/src/gui/kernel/qopenglcontext_p.h
@@ -270,6 +270,8 @@ public:
static QHash<QOpenGLContext *, bool> makeCurrentTracker;
static QMutex makeCurrentTrackerMutex;
#endif
+
+ void _q_screenDestroyed(QObject *object);
};
Q_GUI_EXPORT void qt_gl_set_global_share_context(QOpenGLContext *context);