From: Dave Airlie Date: Sat, 14 Feb 2009 02:01:54 +0000 (+1000) Subject: radeon: check for valid bo in release arrays X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f3a1f321cfa275eba6186626ee691e8bc9ecfe8c;p=mesa.git radeon: check for valid bo in release arrays --- diff --git a/src/mesa/drivers/dri/radeon/radeon_maos_verts.c b/src/mesa/drivers/dri/radeon/radeon_maos_verts.c index bb90a7b1117..d468a972006 100644 --- a/src/mesa/drivers/dri/radeon/radeon_maos_verts.c +++ b/src/mesa/drivers/dri/radeon/radeon_maos_verts.c @@ -438,7 +438,9 @@ void radeonReleaseArrays( GLcontext *ctx, GLuint newinputs ) int i; for (i = 0; i < rmesa->tcl.nr_aos_components; i++) { - radeon_bo_unref(rmesa->tcl.aos[i].bo); - rmesa->tcl.aos[i].bo = NULL; + if (rmesa->tcl.aos[i].bo) { + radeon_bo_unref(rmesa->tcl.aos[i].bo); + rmesa->tcl.aos[i].bo = NULL; + } } }