diff --git a/apps/openmw/mwworld/cellstore.cpp b/apps/openmw/mwworld/cellstore.cpp index 99545a64f..59fa1f5e2 100644 --- a/apps/openmw/mwworld/cellstore.cpp +++ b/apps/openmw/mwworld/cellstore.cpp @@ -650,7 +650,8 @@ namespace MWWorld loadRef (ref, deleted, refNumToID); } - setLastRefNumIndex(refNumToID.rbegin()->first.mIndex); + if(refNumToID.size() != 0) + setLastRefNumIndex(refNumToID.rbegin()->first.mIndex); updateMergedRefs(); }