From 51f95a450465a62a910bce2eef4ed5ac86ceb657 Mon Sep 17 00:00:00 2001 From: nobled Date: Tue, 30 Nov 2010 07:46:18 +0000 Subject: [PATCH] st/dri: Workaround weird null dereference See FDO bug #31940. --- src/gallium/state_trackers/dri/drm/dri2.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c index 3c5b075..cb7f640 100644 --- a/src/gallium/state_trackers/dri/drm/dri2.c +++ b/src/gallium/state_trackers/dri/drm/dri2.c @@ -56,7 +56,10 @@ dri2_invalidate_drawable(__DRIdrawable *dPriv) dri2InvalidateDrawable(dPriv); drawable->dPriv->lastStamp = *drawable->dPriv->pStamp; - if (ctx) + /* XXX: ctx->st should never be null. What's going on? + * https://bugs.freedesktop.org/show_bug.cgi?id=31940 + */ + if (ctx && ctx->st) ctx->st->notify_invalid_framebuffer(ctx->st, &drawable->base); } -- 1.7.0.4