qopenglcontext not checking for null and failing with platform minimal
authorKurt Korbatits <kurt.korbatits@nokia.com>
Tue, 24 Jan 2012 21:10:47 +0000 (07:10 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 2 Feb 2012 00:56:03 +0000 (01:56 +0100)
- The minimal platform plugin returns null and was causing segfault.

Change-Id: Ied262692f77e9801c3d3451de7f21539f7686ca4
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/gui/kernel/qopenglcontext.cpp

index ed7bb5d..f6481d3 100644 (file)
@@ -168,6 +168,8 @@ bool QOpenGLContext::create()
 
     Q_D(QOpenGLContext);
     d->platformGLContext = QGuiApplicationPrivate::platformIntegration()->createPlatformOpenGLContext(this);
+    if (!d->platformGLContext)
+        return false;
     d->platformGLContext->setContext(this);
     if (!d->platformGLContext->isSharing())
         d->shareContext = 0;