intel: added null ptr check

Fixes segfault in context tear-down when glClear was never called.
This commit is contained in:
Brian Paul 2009-05-13 11:31:35 -06:00
parent 2e4e346890
commit 99960393ed

View file

@ -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);