mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 12:31:10 +00:00
[util] Make Hash_DelContext null-safe
This commit is contained in:
parent
f9e442d323
commit
9193a92a81
1 changed files with 3 additions and 0 deletions
|
@ -229,6 +229,9 @@ hash_shutdown (void *data)
|
||||||
VISIBLE void
|
VISIBLE void
|
||||||
Hash_DelContext (hashctx_t *hashctx)
|
Hash_DelContext (hashctx_t *hashctx)
|
||||||
{
|
{
|
||||||
|
if (!hashctx) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
while (hashctx->linksets) {
|
while (hashctx->linksets) {
|
||||||
hlinkset_t *l = hashctx->linksets->next;
|
hlinkset_t *l = hashctx->linksets->next;
|
||||||
free (hashctx->linksets);
|
free (hashctx->linksets);
|
||||||
|
|
Loading…
Reference in a new issue