summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/kernel/qopenglcontext.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 883b60961e..e61c117bfa 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -226,6 +226,9 @@ bool QOpenGLContext::makeCurrent(QSurface *surface)
if (!d->platformGLContext)
return false;
+ if (thread() != QThread::currentThread())
+ qFatal("Cannot make QOpenGLContext current in a different thread");
+
if (!surface) {
doneCurrent();
return true;