projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0fc83b
)
softpipe: Check for NULL pointer in sp_destroy_tile_cache().
author
Michal Krol
<michal@vmware.com>
Thu, 22 Jul 2010 16:32:50 +0000
(18:32 +0200)
committer
Michal Krol
<michal@vmware.com>
Fri, 23 Jul 2010 14:20:37 +0000
(16:20 +0200)
src/gallium/drivers/softpipe/sp_tile_cache.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/softpipe/sp_tile_cache.c
b/src/gallium/drivers/softpipe/sp_tile_cache.c
index d7bc356e507e26f593137ba5f5dfd6fe88e7436b..bf33fd941737716e39feff5d2c3b41330245a343 100644
(file)
--- a/
src/gallium/drivers/softpipe/sp_tile_cache.c
+++ b/
src/gallium/drivers/softpipe/sp_tile_cache.c
@@
-115,16
+115,18
@@
sp_create_tile_cache( struct pipe_context *pipe )
void
sp_destroy_tile_cache(struct softpipe_tile_cache *tc)
{
- uint pos;
+ if (tc) {
+ uint pos;
- for (pos = 0; pos < NUM_ENTRIES; pos++) {
- /*assert(tc->entries[pos].x < 0);*/
- }
- if (tc->transfer) {
- tc->pipe->transfer_destroy(tc->pipe, tc->transfer);
- }
+
for (pos = 0; pos < NUM_ENTRIES; pos++) {
+
/*assert(tc->entries[pos].x < 0);*/
+
}
+
if (tc->transfer) {
+
tc->pipe->transfer_destroy(tc->pipe, tc->transfer);
+
}
- FREE( tc );
+ FREE( tc );
+ }
}