mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 23:09:39 +00:00
Merge remote-tracking branch 'k1ll/store_segfault_fix'
This commit is contained in:
commit
a93034b0a9
1 changed files with 9 additions and 0 deletions
|
@ -187,6 +187,15 @@ namespace MWWorld
|
||||||
T item;
|
T item;
|
||||||
item.mId = Misc::StringUtils::lowerCase(id);
|
item.mId = Misc::StringUtils::lowerCase(id);
|
||||||
|
|
||||||
|
// delete from the static part of mShared
|
||||||
|
typename std::vector<T *>::iterator sharedIter = mShared.begin();
|
||||||
|
for (; sharedIter != (mShared.begin()+mStatic.size()); ++sharedIter) {
|
||||||
|
if((*sharedIter)->mId == item.mId) {
|
||||||
|
mShared.erase(sharedIter);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
typename std::map<std::string, T>::iterator it = mStatic.find(item.mId);
|
typename std::map<std::string, T>::iterator it = mStatic.find(item.mId);
|
||||||
|
|
||||||
if (it != mStatic.end() && Misc::StringUtils::ciEqual(it->second.mId, id)) {
|
if (it != mStatic.end() && Misc::StringUtils::ciEqual(it->second.mId, id)) {
|
||||||
|
|
Loading…
Reference in a new issue