diff options
author | Christian König <[email protected]> | 2011-02-28 23:59:53 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2011-02-28 23:59:53 +0100 |
commit | b97e41c7b18c363a303693fb841fe606b1106fe6 (patch) | |
tree | 5329179ac070a8e3ecc3d3e51c020e004f5b32af /src/glx/dri2_glx.c | |
parent | 77217af40d67612d1f1089ca188393d27a8a038f (diff) | |
parent | 5f44fab5a6ba99c287da8d01fa584763bff2565b (diff) |
Merge remote branch 'origin/master' into pipe-video
Diffstat (limited to 'src/glx/dri2_glx.c')
-rw-r--r-- | src/glx/dri2_glx.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index a275ba5b9fe..2c28bc27150 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -535,8 +535,13 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor, CARD64 ret = 0; #ifdef __DRI2_FLUSH - if (psc->f) - (*psc->f->flush)(priv->driDrawable); + if (psc->f) { + struct glx_context *gc = __glXGetCurrentContext(); + + if (gc) { + (*psc->f->flush)(priv->driDrawable); + } + } #endif /* Old servers don't send invalidate events */ |