diff options
Diffstat (limited to 'src/quick/scenegraph/util/qsgatlastexture.cpp')
-rw-r--r-- | src/quick/scenegraph/util/qsgatlastexture.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/quick/scenegraph/util/qsgatlastexture.cpp b/src/quick/scenegraph/util/qsgatlastexture.cpp index 997d58de0f..99d1d60258 100644 --- a/src/quick/scenegraph/util/qsgatlastexture.cpp +++ b/src/quick/scenegraph/util/qsgatlastexture.cpp @@ -185,11 +185,9 @@ Atlas::~Atlas() void Atlas::invalidate() { - Q_ASSERT(QOpenGLContext::currentContext()); - if (m_texture_id) { + if (m_texture_id && QOpenGLContext::currentContext()) glDeleteTextures(1, &m_texture_id); - m_texture_id = 0; - } + m_texture_id = 0; } Texture *Atlas::create(const QImage &image) |