summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2009-02-14 12:01:54 +1000
committerDave Airlie <[email protected]>2009-02-14 12:05:36 +1000
commitf3a1f321cfa275eba6186626ee691e8bc9ecfe8c (patch)
tree0009191add6f067aa7637504c89ee8c600629b67 /src/mesa/drivers
parentfcc7a691dc968d9d2bc61a8bf18dfbd7ed789598 (diff)
radeon: check for valid bo in release arrays
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_maos_verts.c6
1 files 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;
+ }
}
}