From: Cooper Yuan Date: Tue, 16 Aug 2011 12:37:13 +0000 (+0800) Subject: dri2: check if context is valid before flushing the pipe X-Git-Tag: 062012170305~4896^2~243 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f272117def7a7962f355581d038af6d0981a23cb;p=profile%2Fivi%2Fmesa.git dri2: check if context is valid before flushing the pipe --- 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