aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-23 12:01:51 +0100
committermarha <marha@users.sourceforge.net>2012-01-23 12:01:51 +0100
commit2c28371774f845e604217022b14c9918f1518103 (patch)
tree5377a3a8c0c1fc0e4329d37a2c5d0672757bab95 /xorg-server/glx
parent6b7b7d9ce2264b35d19ecec6bf1f28894dbcada7 (diff)
downloadvcxsrv-2c28371774f845e604217022b14c9918f1518103.tar.gz
vcxsrv-2c28371774f845e604217022b14c9918f1518103.tar.bz2
vcxsrv-2c28371774f845e604217022b14c9918f1518103.zip
Solved possible crash when closing opengl client
Diffstat (limited to 'xorg-server/glx')
-rw-r--r--xorg-server/glx/glxext.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xorg-server/glx/glxext.c b/xorg-server/glx/glxext.c
index d23d10059..42cb274f0 100644
--- a/xorg-server/glx/glxext.c
+++ b/xorg-server/glx/glxext.c
@@ -48,6 +48,7 @@
#include "glxext.h"
#include "indirect_table.h"
#include "indirect_util.h"
+#include "glapi.h"
extern void FlushContext(__GLXcontext *cx);
@@ -138,7 +139,7 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
for (c = glxAllContexts; c; c = next) {
next = c->next;
if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
- FlushContext(c);
+ if (GET_DISPATCH()) FlushContext(c); /* Only flush if we still have a context */
(*c->loseCurrent)(c);
c->isCurrent = GL_FALSE;