From 445b4f906a59d023afb8ebf96ad3b40ef941f3a5 Mon Sep 17 00:00:00 2001 From: nobled Date: Tue, 30 Nov 2010 02:39:21 -0500 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