From: Chris Wilson Date: Thu, 10 Mar 2011 18:01:32 +0000 (+0000) Subject: i915: Detect allocation failure of batch buffer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b094dff50a05e56f5415d31daa5e4542f321c858;p=mesa.git i915: Detect allocation failure of batch buffer Signed-off-by: Chris Wilson --- diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c index 921183b81df..942ebec29bd 100644 --- a/src/mesa/drivers/dri/i915/i915_vtbl.c +++ b/src/mesa/drivers/dri/i915/i915_vtbl.c @@ -307,6 +307,10 @@ i915_emit_state(struct intel_context *intel) false); count = 0; again: + if (intel->batch.bo == NULL) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "i915 emit state"); + assert(0); + } aper_count = 0; dirty = get_dirty(state);