summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-07-16 23:18:09 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-07-17 09:00:57 +0200
commite0a486c77d49f4410820aa6f4139ff00d7668a7d (patch)
tree98d85080e6c24be55b3be240985169f2fb313cf5 /src/gui
parent6bd35e47080b3ddfe14543f805e744846e245c2f (diff)
Tie QPlatformOpenGLContext to its QOpenGLContext before initializing
So that the context can be referenced during initialization. Change-Id: I9ec69b2431ba1ac6256cb2e969a76f515497e247 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qopenglcontext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 9a6f879431..499d16c109 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -612,8 +612,8 @@ bool QOpenGLContext::create()
d->platformGLContext = QGuiApplicationPrivate::platformIntegration()->createPlatformOpenGLContext(this);
if (!d->platformGLContext)
return false;
- d->platformGLContext->initialize();
d->platformGLContext->setContext(this);
+ d->platformGLContext->initialize();
if (!d->platformGLContext->isSharing())
d->shareContext = 0;
d->shareGroup = d->shareContext ? d->shareContext->shareGroup() : new QOpenGLContextGroup;