From 519723b20754681862b3d6e8eaeed35f852607cb Mon Sep 17 00:00:00 2001 From: Eugeni Dodonov Date: Wed, 8 Jun 2011 16:16:37 -0300 Subject: [PATCH] Prevent crash when region is null (freedesktop bug #37700) --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index ad74404..6978de8 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -599,7 +599,7 @@ prepare_wm_surfaces(struct brw_context *brw) struct intel_renderbuffer *irb = intel_renderbuffer(rb); struct intel_region *region = irb ? irb->region : NULL; - brw_add_validated_bo(brw, region->buffer); + brw_add_validated_bo(brw, (region == NULL) ? NULL : region->buffer); nr_surfaces = SURF_INDEX_DRAW(i) + 1; } } -- 1.7.5.4