mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 21:42:13 +00:00
Don't crash when trying to delete a reference that doesn't exist anymore
This commit is contained in:
parent
5af89a9e8f
commit
3f8a69b4ad
@ -43,7 +43,8 @@ namespace MWWorld
|
||||
// Skip this when reference was deleted.
|
||||
// TODO: Support respawning references, in this case, we need to track it somehow.
|
||||
if (ref.mDeleted) {
|
||||
mList.erase(iter);
|
||||
if (iter != mList.end())
|
||||
mList.erase(iter);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user