diff options
author | Tasuku Suzuki <stasuku@gmail.com> | 2014-04-16 12:50:24 +0900 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-16 13:29:12 +0200 |
commit | cd21b56c9dbb078828c86a5a073f13074b1645d2 (patch) | |
tree | 927c203900ff2bf58cd947058f1b0335199e06cd /src/gui | |
parent | 50b8506eaccc3c9bc3d717b241193bc8be9708b0 (diff) |
remove context unmatched warning in QOpenGLTexture
destroy() or destructor complain when QOpenGLTexture is not created or
it is already destroyed.
Change-Id: I6b3135849e3ba2ce35678fcdbf1c9b6e588a063c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/opengl/qopengltexture.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp index 078274eabd..51d35cbd59 100644 --- a/src/gui/opengl/qopengltexture.cpp +++ b/src/gui/opengl/qopengltexture.cpp @@ -180,6 +180,10 @@ bool QOpenGLTexturePrivate::create() void QOpenGLTexturePrivate::destroy() { + if (!context) { + // not created or already destroyed + return; + } if (QOpenGLContext::currentContext() != context) { qWarning("Requires a valid current OpenGL context.\n" "Texture has not been destroyed"); |