diff options
author | Andy Nichols <andy.nichols@digia.com> | 2014-09-01 12:45:10 +0200 |
---|---|---|
committer | Andy Nichols <andy.nichols@digia.com> | 2014-09-01 12:51:45 +0200 |
commit | 64d844ff6e5c007f44747a5a7a3c3646ca95a632 (patch) | |
tree | e14bcc815c81e9e8368d97c8c03016e37c21cd3d /src/quick/scenegraph/util/qsgshadersourcebuilder.cpp | |
parent | 02a53eae69b7938c142739bd019b962d62560d52 (diff) |
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 <lars.knoll@digia.com>
Diffstat (limited to 'src/quick/scenegraph/util/qsgshadersourcebuilder.cpp')
-rw-r--r-- | src/quick/scenegraph/util/qsgshadersourcebuilder.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp b/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp index 824b7908f2..ebfe86e8a7 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; } |