aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;