mirror of https://github.com/qt/qtbase.git
Windows QPA: Check QWindowsStaticOpenGLContext in nativeResourceForIntegration().
The instance of QWindowsStaticOpenGLContext has been observed to be 0. Task-number: QTBUG-52387 Change-Id: I1ca97c6df0d96e732ae62354e03f465cd461bcb4 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
parent
7bd08f4bfd
commit
58c23ae161
|
@ -138,8 +138,10 @@ void *QWindowsNativeInterface::nativeResourceForIntegration(const QByteArray &re
|
|||
#ifdef QT_NO_OPENGL
|
||||
Q_UNUSED(resource)
|
||||
#else
|
||||
if (resourceType(resource) == GlHandleType)
|
||||
return QWindowsIntegration::staticOpenGLContext()->moduleHandle();
|
||||
if (resourceType(resource) == GlHandleType) {
|
||||
if (const QWindowsStaticOpenGLContext *sc = QWindowsIntegration::staticOpenGLContext())
|
||||
return sc->moduleHandle();
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue