projects
/
profile
/
ivi
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7eb7d67
)
intel: add null src pointer check in intel_region_reference()
author
Brian Paul
<brianp@vmware.com>
Thu, 7 Jul 2011 23:29:28 +0000
(17:29 -0600)
committer
Brian Paul
<brianp@vmware.com>
Fri, 8 Jul 2011 01:22:06 +0000
(19:22 -0600)
Fixes segfault when running cubemap demo on i945. This happened
when intel_region_reference() was called in i915_set_draw_region()
with depth_region=NULL.
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/intel/intel_regions.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/intel/intel_regions.c
b/src/mesa/drivers/dri/intel/intel_regions.c
index
6cf37c4
..
4c4945c
100644
(file)
--- a/
src/mesa/drivers/dri/intel/intel_regions.c
+++ b/
src/mesa/drivers/dri/intel/intel_regions.c
@@
-271,7
+271,8
@@
intel_region_reference(struct intel_region **dst, struct intel_region *src)
if (*dst)
intel_region_release(dst);
- src->refcount++;
+ if (src)
+ src->refcount++;
*dst = src;
}
}