Mesa (master): dri2: check if context is valid before flushing the pipe
Cooper Yuan
cooperyuan at kemper.freedesktop.org
Tue Aug 16 12:41:56 UTC 2011
Module: Mesa
Branch: master
Commit: f272117def7a7962f355581d038af6d0981a23cb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f272117def7a7962f355581d038af6d0981a23cb
Author: Cooper Yuan <cooperyuan at gmail.com>
Date: Tue Aug 16 20:37:13 2011 +0800
dri2: check if context is valid before flushing the pipe
---
src/gallium/state_trackers/dri/drm/dri2.c | 3 ++-
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 908a735..53638da 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
More information about the mesa-commit
mailing list