summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@digia.com>2014-09-10 10:00:35 +0200
committerJørgen Lind <jorgen.lind@digia.com>2014-09-10 14:22:39 +0200
commita56cfad51a0ee5526536a6b2d4f3042ff8b00e86 (patch)
treea19c0853e732426a13655c7869bcbeb95a330e06 /src
parent2f96fb1beec5251e27381c09d0ad810c6e829c37 (diff)
Destroy the QOpenGLTextureBlitter in the destructor
if it has not already been destroyed Change-Id: If9a29da25eb23d5d65204eecabe095df215737ee Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/opengl/qopengltextureblitter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/opengl/qopengltextureblitter.cpp b/src/gui/opengl/qopengltextureblitter.cpp
index ebe0429290..24bdafed01 100644
--- a/src/gui/opengl/qopengltextureblitter.cpp
+++ b/src/gui/opengl/qopengltextureblitter.cpp
@@ -238,6 +238,7 @@ QOpenGLTextureBlitter::QOpenGLTextureBlitter()
QOpenGLTextureBlitter::~QOpenGLTextureBlitter()
{
+ destroy();
}
bool QOpenGLTextureBlitter::create()
@@ -303,6 +304,8 @@ bool QOpenGLTextureBlitter::isCreated() const
void QOpenGLTextureBlitter::destroy()
{
+ if (!isCreated())
+ return;
Q_D(QOpenGLTextureBlitter);
d->program.reset();
d->vertexBuffer.destroy();