st/dri: fix crash with HUD and single buffering

This commit is contained in:
Marek Olšák
2013-03-27 01:56:25 +01:00
parent 6b5dfa42c9
commit a19f6e880a
@@ -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);