mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
Check for prim/vertex store non-null before messing with refcounts.
This commit is contained in:
parent
258f005c6b
commit
738c9a073f
1 changed files with 4 additions and 2 deletions
|
|
@ -1714,9 +1714,11 @@ void _tnl_save_destroy( GLcontext *ctx )
|
|||
* display lists yet to be destroyed, so it may not yet be time to
|
||||
* free these items.
|
||||
*/
|
||||
if ( --tnl->save.prim_store->refcount == 0 )
|
||||
if (tnl->save.prim_store &&
|
||||
--tnl->save.prim_store->refcount == 0 )
|
||||
FREE( tnl->save.prim_store );
|
||||
|
||||
if ( --tnl->save.vertex_store->refcount == 0 )
|
||||
if (tnl->save.vertex_store &&
|
||||
--tnl->save.vertex_store->refcount == 0 )
|
||||
FREE( tnl->save.vertex_store );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue