i965: fixup depth buffer check
authorDave Airlie <airlied@panoply-rh.(none)>
Fri, 18 Apr 2008 05:37:54 +0000 (15:37 +1000)
committerDave Airlie <airlied@panoply-rh.(none)>
Fri, 18 Apr 2008 05:37:54 +0000 (15:37 +1000)
src/mesa/drivers/dri/i965/brw_misc_state.c

index ec0bd6b22ccab7721bd097bd39fac44b8ae0a22b..26ec797b5fdd5abda64f47b2b514a4c250dac20b 100644 (file)
@@ -183,7 +183,7 @@ static int prepare_depthbuffer(struct brw_context *brw)
 {
    struct intel_region *region = brw->state.depth_region;
 
-   if (region->buffer)
+   if (!region || !region->buffer)
       return 0;
    return dri_bufmgr_check_aperture_space(region->buffer);
 }