mesa: check if TNL state is null in _tnl_free_vertices() to avoid potential segfault
authorBrian Paul <brianp@vmware.com>
Fri, 13 Feb 2009 15:11:01 +0000 (08:11 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 13 Feb 2009 15:11:01 +0000 (08:11 -0700)
commitac53b1b0345f10f988c412af528bfd38052acab5
treec4bc4288550e7b0c5eee429587aaac6ce33aa2b1
parent6559107c7ae67ae6a94f53728cad85137aaf6312
mesa: check if TNL state is null in _tnl_free_vertices() to avoid potential segfault

_tnl_free_vertices() is called from several places during context tear-down.
Depending on the order in which the swrast, swrast_setup and tnl context is
destroyed we could hit a null pointer here.  This doesn't seem to be an
actual issue with any Mesa drivers, but let's be safe.
src/mesa/tnl/t_vertex.c