summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglfunctions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/opengl/qopenglfunctions.cpp')
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index d614ad8401..bfd30735b2 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -5795,7 +5795,9 @@ QOpenGLES3Helper::QOpenGLES3Helper()
{
m_supportedVersion = qMakePair(2, 0);
- if (init()) {
+ if (Q_UNLIKELY(!init())) {
+ qFatal("Failed to load libGLESv2");
+ } else {
const QPair<int, int> contextVersion = QOpenGLContext::currentContext()->format().version();
qCDebug(lcGLES3, "Resolving OpenGL ES 3.0 entry points");
@@ -5993,8 +5995,6 @@ QOpenGLES3Helper::QOpenGLES3Helper()
}
m_supportedVersion = qMakePair(3, 1);
}
- } else {
- qFatal("Failed to load libGLESv2");
}
}