mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Call Delete() instead of deleting the item as it could cause issues if the item is being deleted while iterating over edicts
This commit is contained in:
parent
f5558d106e
commit
a5058c7bab
1 changed files with 1 additions and 1 deletions
|
@ -1032,7 +1032,7 @@ void Sentient::FreeInventory(void)
|
|||
num = inventory.NumObjects();
|
||||
for (i = num; i > 0; i--) {
|
||||
item = (Item *)G_GetEntity(inventory.ObjectAt(i));
|
||||
delete item;
|
||||
item->Delete();
|
||||
}
|
||||
inventory.ClearObjectList();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue