From: Eric Anholt Date: Tue, 26 Feb 2008 21:28:51 +0000 (-0800) Subject: [965] Don't segfault on INTEL_DEBUG=batch when a surface buffer is NULL. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=451bd1941e9791882f7931c8613643f152871e79;p=mesa.git [965] Don't segfault on INTEL_DEBUG=batch when a surface buffer is NULL. --- diff --git a/src/mesa/drivers/dri/i965/brw_state_dump.c b/src/mesa/drivers/dri/i965/brw_state_dump.c index 9eb27cc2672..319dac87498 100644 --- a/src/mesa/drivers/dri/i965/brw_state_dump.c +++ b/src/mesa/drivers/dri/i965/brw_state_dump.c @@ -94,6 +94,10 @@ static void dump_wm_surface_state(struct brw_context *brw) struct brw_surface_state *surf; char name[20]; + if (surf_bo == NULL) { + fprintf(stderr, "WM SS%d: NULL\n", i); + continue; + } dri_bo_map(surf_bo, GL_FALSE); surfoff = surf_bo->offset; surf = (struct brw_surface_state *)(surf_bo->virtual);