diff options
author | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2015-08-09 07:06:52 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2015-08-09 07:06:52 +0000 |
commit | 5bfac9d653357c906946563b9494d7ae69cdad92 (patch) | |
tree | 0cc119af894a398497eba6f56fe2f224f6947616 /src/gui/opengl/qopengltexture.cpp | |
parent | f08e1ecdc88e9373a31c1505d5db7f905431c644 (diff) | |
parent | 77da617dc8e378a631ee8c15b1b414f16b87f147 (diff) |
Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev
Diffstat (limited to 'src/gui/opengl/qopengltexture.cpp')
-rw-r--r-- | src/gui/opengl/qopengltexture.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp index 9b82233b9a..301b2ad13d 100644 --- a/src/gui/opengl/qopengltexture.cpp +++ b/src/gui/opengl/qopengltexture.cpp @@ -179,8 +179,9 @@ void QOpenGLTexturePrivate::destroy() // not created or already destroyed return; } - if (QOpenGLContext::currentContext() != context) { - qWarning("Requires a valid current OpenGL context.\n" + QOpenGLContext *currentContext = QOpenGLContext::currentContext(); + if (!currentContext || !QOpenGLContext::areSharing(currentContext, context)) { + qWarning("Texture is not valid in the current context.\n" "Texture has not been destroyed"); return; } |