From aa5ff684769f46f5f1a835a937d3f164c560a144 Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Wed, 25 Jan 2012 07:10:47 +1000 Subject: qopenglcontext not checking for null and failing with platform minimal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - The minimal platform plugin returns null and was causing segfault. Change-Id: Ied262692f77e9801c3d3451de7f21539f7686ca4 Reviewed-by: Kurt Korbatits Reviewed-by: Jason McDonald Reviewed-by: Rohan McGovern Reviewed-by: Samuel Rødal --- src/gui/kernel/qopenglcontext.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui/kernel') diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index ed7bb5d4b7..f6481d3bb0 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -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; -- cgit v1.2.3