1
0
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:
scrawl 2013-08-26 00:14:02 +02:00
parent 5af89a9e8f
commit 3f8a69b4ad

View File

@ -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;
}