[965] Don't segfault on INTEL_DEBUG=batch when a surface buffer is NULL.

This commit is contained in:
Eric Anholt 2008-02-26 13:28:51 -08:00
parent 09aa4b3690
commit 451bd1941e
1 changed files with 4 additions and 0 deletions

View File

@ -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);