summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2017-06-19 16:31:50 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-06-28 11:25:42 +0000
commitdcaa2d057b2276acb6f98b4ef071912babe1961c (patch)
tree95ff978af8ef67966915a12982dff7d7c41299eb /src/opengl
parent0c7e4b97a7990b29255abaf4568f62b6a6b6c470 (diff)
Fix crash when running tst_qlbuffers under Angle
Angle does not support glGetBufferSubData. Task-number: QTQAINFRA-1199 Change-Id: I17f99027cc374131965d6589d2babacb75f9174a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qglbuffer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opengl/qglbuffer.cpp b/src/opengl/qglbuffer.cpp
index 08aa37e5aa..200ee2499e 100644
--- a/src/opengl/qglbuffer.cpp
+++ b/src/opengl/qglbuffer.cpp
@@ -343,7 +343,7 @@ bool QGLBuffer::read(int offset, void *data, int count)
{
#if !defined(QT_OPENGL_ES)
Q_D(QGLBuffer);
- if (!d->funcs->hasOpenGLFeature(QOpenGLFunctions::Buffers) || !d->guard->id())
+ if (!d->funcs->hasOpenGLFeature(QOpenGLFunctions::Buffers) || !d->guard->id() || !d->funcs->d()->GetBufferSubData)
return false;
while (d->funcs->glGetError() != GL_NO_ERROR) ; // Clear error state.
d->funcs->glGetBufferSubData(d->type, offset, count, data);