summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qgl_p.h')
-rw-r--r--src/opengl/qgl_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 4742bdb..b46d428 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -506,7 +506,8 @@ private slots:
// when you come to delete the context.
QGLContextPrivate::unbindPixmapFromTexture(boundPixmap);
glDeleteTextures(1, &id);
- oldContext->makeCurrent();
+ if (oldContext)
+ oldContext->makeCurrent();
return;
}
#endif