fix crash on reset

fix tests
depth-refraction
florent.teppe 2 years ago
parent 9f597ecfea
commit 6c6dbccd0a

@ -92,6 +92,7 @@ void MWWorld::WorldModel::clear()
mLastGeneratedRefnum = ESM::RefNum{};
mInteriors.clear();
mExteriors.clear();
mCells.clear();
std::fill(mIdCache.begin(), mIdCache.end(), std::make_pair(ESM::RefId(), (MWWorld::CellStore*)nullptr));
mIdCacheIndex = 0;
}

@ -491,9 +491,6 @@ namespace
else
result = esmStore.get<RecordType>().search(refId);
if (result == nullptr || result->mId != refId)
int debug = 0;
ASSERT_NE(result, nullptr);
EXPECT_EQ(result->mId, refId);
}

Loading…
Cancel
Save