st/dri: fix crash with HUD and single buffering
authorMarek Olšák <maraeo@gmail.com>
Wed, 27 Mar 2013 00:56:25 +0000 (01:56 +0100)
committerMarek Olšák <maraeo@gmail.com>
Thu, 28 Mar 2013 17:17:21 +0000 (18:17 +0100)
src/gallium/state_trackers/dri/common/dri_drawable.c

index 00ae1daed8a035e80fdf78ddf9b5bbbfb8c0b134..cd4a36a139fecb451613997baee5674077dafaaa 100644 (file)
@@ -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);