mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-29 07:32:02 +00:00
[iqm] Check frames before freeing its buffer
Fixes a segfault on shutdown when the iqm model has no animation data.
This commit is contained in:
parent
23b041c2c0
commit
2b5b55f416
1 changed files with 4 additions and 2 deletions
|
@ -533,8 +533,10 @@ Mod_FreeIQM (iqm_t *iqm)
|
|||
free (iqm->baseframe);
|
||||
free (iqm->inverse_baseframe);
|
||||
free (iqm->anims);
|
||||
if (iqm->frames) {
|
||||
free (iqm->frames[0]);
|
||||
free (iqm->frames);
|
||||
}
|
||||
free (iqm);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue