From e0a486c77d49f4410820aa6f4139ff00d7668a7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 16 Jul 2019 23:18:09 +0200 Subject: Tie QPlatformOpenGLContext to its QOpenGLContext before initializing So that the context can be referenced during initialization. Change-Id: I9ec69b2431ba1ac6256cb2e969a76f515497e247 Reviewed-by: Timur Pocheptsov --- src/gui/kernel/qopenglcontext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3