remove context unmatched warning in QOpenGLTexture
destroy() or destructor complain when QOpenGLTexture is not created or it is already destroyed. Change-Id: I6b3135849e3ba2ce35678fcdbf1c9b6e588a063c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
parent
50b8506eac
commit
cd21b56c9d
@ -180,6 +180,10 @@ bool QOpenGLTexturePrivate::create()
|
||||
|
||||
void QOpenGLTexturePrivate::destroy()
|
||||
{
|
||||
if (!context) {
|
||||
// not created or already destroyed
|
||||
return;
|
||||
}
|
||||
if (QOpenGLContext::currentContext() != context) {
|
||||
qWarning("Requires a valid current OpenGL context.\n"
|
||||
"Texture has not been destroyed");
|
||||
|
Loading…
Reference in New Issue
Block a user