From: Marek Olšák Date: Wed, 27 Mar 2013 00:56:25 +0000 (+0100) Subject: st/dri: fix crash with HUD and single buffering X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a19f6e880acfb8ec5b5ea0900602de5a27b12664;p=mesa.git st/dri: fix crash with HUD and single buffering --- diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.c b/src/gallium/state_trackers/dri/common/dri_drawable.c index 00ae1daed8a..cd4a36a139f 100644 --- a/src/gallium/state_trackers/dri/common/dri_drawable.c +++ b/src/gallium/state_trackers/dri/common/dri_drawable.c @@ -435,7 +435,8 @@ dri_flush(__DRIcontext *cPriv, } /* Flush the drawable. */ - if (flags & __DRI2_FLUSH_DRAWABLE) { + if ((flags & __DRI2_FLUSH_DRAWABLE) && + drawable->textures[ST_ATTACHMENT_BACK_LEFT]) { /* Resolve MSAA buffers. */ if (drawable->stvis.samples > 1) { dri_msaa_resolve(ctx, drawable, ST_ATTACHMENT_BACK_LEFT);