intel: add null src pointer check in intel_region_reference()
authorBrian Paul <brianp@vmware.com>
Thu, 7 Jul 2011 23:29:28 +0000 (17:29 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 8 Jul 2011 01:22:06 +0000 (19:22 -0600)
commitd8f65c07e9f3a5948c8bee95482bcab651b33c01
tree044618dd19e485f535f4403712ad1cb60679843f
parent7eb7d67d50fccb64248d1fc6f490895048d7d32e
intel: add null src pointer check in intel_region_reference()

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