From 99960393edb3d6c0d3702cf51b59c2e4189117c7 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 13 May 2009 11:31:35 -0600 Subject: intel: added null ptr check Fixes segfault in context tear-down when glClear was never called. --- src/mesa/drivers/dri/intel/intel_context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/intel') diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index 07d53aad23..5dc3df395d 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); -- cgit v1.2.3