From a5b254ff23b9ca3099a9f13e93727e1cd52c8720 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 14 Dec 2015 14:16:12 +0100 Subject: QOpenGLTexture: check textureId for knowing whether a texture was created Change-Id: I0775ad9538a7793dc6628abe4556404634ae0462 Reviewed-by: Sean Harmer --- src/gui/opengl/qopengltexture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp index 301b2ad13d..33c0d0bb60 100644 --- a/src/gui/opengl/qopengltexture.cpp +++ b/src/gui/opengl/qopengltexture.cpp @@ -175,7 +175,7 @@ bool QOpenGLTexturePrivate::create() void QOpenGLTexturePrivate::destroy() { - if (!context) { + if (!textureId) { // not created or already destroyed return; } -- cgit v1.2.3