From f3a1f321cfa275eba6186626ee691e8bc9ecfe8c Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sat, 14 Feb 2009 12:01:54 +1000 Subject: [PATCH] radeon: check for valid bo in release arrays --- src/mesa/drivers/dri/radeon/radeon_maos_verts.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; + } } } -- 2.30.2