softpipe: Check for NULL pointer in sp_destroy_tile_cache().
This commit is contained in:
@@ -115,6 +115,7 @@ sp_create_tile_cache( struct pipe_context *pipe )
|
|||||||
void
|
void
|
||||||
sp_destroy_tile_cache(struct softpipe_tile_cache *tc)
|
sp_destroy_tile_cache(struct softpipe_tile_cache *tc)
|
||||||
{
|
{
|
||||||
|
if (tc) {
|
||||||
uint pos;
|
uint pos;
|
||||||
|
|
||||||
for (pos = 0; pos < NUM_ENTRIES; pos++) {
|
for (pos = 0; pos < NUM_ENTRIES; pos++) {
|
||||||
@@ -125,6 +126,7 @@ sp_destroy_tile_cache(struct softpipe_tile_cache *tc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
FREE( tc );
|
FREE( tc );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user