softpipe: need to set tc->transfer=NULL after destroying the transfer object
authorBrian Paul <brianp@vmware.com>
Wed, 18 Mar 2009 15:55:00 +0000 (09:55 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 18 Mar 2009 16:24:19 +0000 (10:24 -0600)
This fixes a number of crashes/regressions in programs such as lodbias.c,
mipmap_limits.c, etc.

src/gallium/drivers/softpipe/sp_tile_cache.c

index 51e34d0d621165686f7b8427479a6a09ce579d77..6db7930ec8334349535a690931a8e96af08d30d1 100644 (file)
@@ -172,6 +172,7 @@ sp_tile_cache_set_surface(struct softpipe_tile_cache *tc,
       }
 
       screen->tex_transfer_destroy(tc->transfer);
+      tc->transfer = NULL;
    }
 
    tc->surface = ps;