aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-05-13 11:31:35 -0600
committerBrian Paul <[email protected]>2009-05-13 11:33:16 -0600
commit99960393edb3d6c0d3702cf51b59c2e4189117c7 (patch)
treeb19014c431f4599de8187bd82c3491943311c9de
parent2e4e34689022ecfcc7dc107427db90cc52a94d63 (diff)
intel: added null ptr check
Fixes segfault in context tear-down when glClear was never called.
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 07d53aad23f..5dc3df395d1 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -756,7 +756,8 @@ intelDestroyContext(__DRIcontextPrivate * driContextPriv)
INTEL_FIREVERTICES(intel);
- _mesa_delete_array_object(&intel->ctx, intel->clear.arrayObj);
+ if (intel->clear.arrayObj)
+ _mesa_delete_array_object(&intel->ctx, intel->clear.arrayObj);
intel->vtbl.destroy(intel);