From a19f6e880acfb8ec5b5ea0900602de5a27b12664 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 27 Mar 2013 01:56:25 +0100 Subject: st/dri: fix crash with HUD and single buffering --- src/gallium/state_trackers/dri/common/dri_drawable.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gallium/state_trackers') 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); -- cgit v1.2.3