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 8285f06..547e457 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -519,7 +519,8 @@ private slots:
// when you come to delete the context.
QGLContextPrivate::unbindPixmapFromTexture(boundPixmap);
glDeleteTextures(1, &id);
- oldContext->makeCurrent();
+ if (oldContext)
+ oldContext->makeCurrent();
return;
}
#endif