dri2: check if context is valid before flushing the pipe

This commit is contained in:
Cooper Yuan 2011-08-16 20:37:13 +08:00
parent e3be513118
commit f272117def

View file

@ -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