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
parent
2f96fb1bee
commit
a56cfad51a
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue