summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAlvin Wong <alvinhochun@gmail.com>2019-04-25 19:08:04 +0800
committerAlvin Wong <alvinhochun@gmail.com>2019-04-27 10:41:44 +0000
commitc9002ab7eec1649d700865eac418f1f5d3b0d1a2 (patch)
tree4a2341672bfaf368ccd994eb898e7032e1e13c19 /src/gui
parent71a7f79bc199b79377c5eaeddd74bc75b3f7af68 (diff)
Fix QOpenGLDebugLogger crash on ANGLE
The helper in QOpenGLDebugLogger did not account for the extra "KHR" suffix in the function names and results in a crash when ANGLE is being used. This commit fixes this issue. Change-Id: I439d8bfc53b010be5410286b86c090aff171aaef Fixes: QTBUG-62070 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/opengl/qopengldebug.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/opengl/qopengldebug.cpp b/src/gui/opengl/qopengldebug.cpp
index 2e628a2bd5..9f1bb76869 100644
--- a/src/gui/opengl/qopengldebug.cpp
+++ b/src/gui/opengl/qopengldebug.cpp
@@ -1366,7 +1366,7 @@ bool QOpenGLDebugLogger::initialize()
#define GET_DEBUG_PROC_ADDRESS(procName) \
d->procName = reinterpret_cast< qt_ ## procName ## _t >( \
- d->context->getProcAddress(#procName) \
+ d->context->getProcAddress(d->context->isOpenGLES() ? (#procName "KHR") : (#procName)) \
);
GET_DEBUG_PROC_ADDRESS(glDebugMessageControl);