summaryrefslogtreecommitdiff
path: root/src/quick/scenegraph/util/qsgtexture.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@sletta.org>2014-09-12 17:34:34 +0200
committerLaszlo Agocs <laszlo.agocs@digia.com>2014-09-12 20:51:33 +0200
commit2153ca682a934ad969c8a4d49bfc857fa756ac9f (patch)
tree338cf17ba06d30ef71e88b419697fe16331b6914 /src/quick/scenegraph/util/qsgtexture.cpp
parentdb44ad2be915fc00faba77bd9b1d19e3ec53b42c (diff)
downloadqtdeclarative-2153ca682a934ad969c8a4d49bfc857fa756ac9f.tar.gz
Let QSGPlainTexture support shutting down without a GL context.
Change-Id: Iae934e4d9e91f4ea21dd5bf27c4fafc5d481fb0a Task-number: QTBUG-41278 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/quick/scenegraph/util/qsgtexture.cpp')
-rw-r--r--src/quick/scenegraph/util/qsgtexture.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/scenegraph/util/qsgtexture.cpp b/src/quick/scenegraph/util/qsgtexture.cpp
index 4612e6b87d..fc5050014e 100644
--- a/src/quick/scenegraph/util/qsgtexture.cpp
+++ b/src/quick/scenegraph/util/qsgtexture.cpp
@@ -563,7 +563,7 @@ QSGPlainTexture::QSGPlainTexture()
QSGPlainTexture::~QSGPlainTexture()
{
- if (m_texture_id && m_owns_texture)
+ if (m_texture_id && m_owns_texture && QOpenGLContext::currentContext())
QOpenGLContext::currentContext()->functions()->glDeleteTextures(1, &m_texture_id);
}