summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorCooper Yuan <[email protected]>2011-08-16 20:37:13 +0800
committerCooper Yuan <[email protected]>2011-08-16 20:37:13 +0800
commitf272117def7a7962f355581d038af6d0981a23cb (patch)
tree9d4d7f201128d869b8a19b34954e5d36d8e90392 /src/gallium
parente3be51311834217cf35be9186e7dc9f57a10d44b (diff)
dri2: check if context is valid before flushing the pipe
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/dri/drm/dri2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index 908a735234e..53638da9888 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -49,7 +49,8 @@ dri2_flush_drawable(__DRIdrawable *draw)
struct dri_drawable *drawable = dri_drawable(draw);
struct dri_context *ctx = dri_get_current(draw->driScreenPriv);
- ctx->st->flush(ctx->st, 0, NULL);
+ if (ctx)
+ ctx->st->flush(ctx->st, 0, NULL);
}
static void