Destroy the QOpenGLTextureBlitter in the destructor

if it has not already been destroyed

Change-Id: If9a29da25eb23d5d65204eecabe095df215737ee
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
bb10
Jørgen Lind 2014-09-10 10:00:35 +02:00
parent 2f96fb1bee
commit a56cfad51a
1 changed files with 3 additions and 0 deletions

View File

@ -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();