From 64d844ff6e5c007f44747a5a7a3c3646ca95a632 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Mon, 1 Sep 2014 12:45:10 +0200 Subject: [PATCH] Remove Q_ASSERT when getting the OpenGL Context Profile We do not actually use the OpenGL context in this method other than to query the profile type if one is available. In the case that there is no context the profile type does not matter and the default value of QSurfaceFormat::NoProfile is correct. Change-Id: Ice4440fe0e578d4cdcba347f5325768667722af8 Reviewed-by: Lars Knoll --- src/quick/scenegraph/util/qsgshadersourcebuilder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp b/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp index 824b790..ebfe86e 100644 --- a/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp +++ b/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp @@ -387,8 +387,8 @@ QSurfaceFormat::OpenGLContextProfile QSGShaderSourceBuilder::contextProfile() co { QOpenGLContext *context = QOpenGLContext::currentContext(); QSurfaceFormat::OpenGLContextProfile profile = QSurfaceFormat::NoProfile; - Q_ASSERT(context); - profile = context->format().profile(); + if (context) + profile = context->format().profile(); return profile; } -- 2.7.4