forked from teamnwah/openmw-tes3coop
Don't call Store::setUp() unnecessarily
Fixes a threading issue with ESM::Land store caused by calling setUp() while it's being used.
This commit is contained in:
parent
5bb7d76913
commit
a708ac488e
3 changed files with 6 additions and 1 deletions
|
@ -607,6 +607,11 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
void Store<ESM::Cell>::clearDynamic()
|
||||||
|
{
|
||||||
|
setUp();
|
||||||
|
}
|
||||||
|
|
||||||
void Store<ESM::Cell>::setUp()
|
void Store<ESM::Cell>::setUp()
|
||||||
{
|
{
|
||||||
typedef DynamicExt::iterator ExtIterator;
|
typedef DynamicExt::iterator ExtIterator;
|
||||||
|
|
|
@ -293,6 +293,7 @@ namespace MWWorld
|
||||||
const ESM::Cell *find(const std::string &id) const;
|
const ESM::Cell *find(const std::string &id) const;
|
||||||
const ESM::Cell *find(int x, int y) const;
|
const ESM::Cell *find(int x, int y) const;
|
||||||
|
|
||||||
|
virtual void clearDynamic();
|
||||||
void setUp();
|
void setUp();
|
||||||
|
|
||||||
RecordId load(ESM::ESMReader &esm);
|
RecordId load(ESM::ESMReader &esm);
|
||||||
|
|
|
@ -295,7 +295,6 @@ namespace MWWorld
|
||||||
mWorldScene->clear();
|
mWorldScene->clear();
|
||||||
|
|
||||||
mStore.clearDynamic();
|
mStore.clearDynamic();
|
||||||
mStore.setUp();
|
|
||||||
|
|
||||||
if (mPlayer)
|
if (mPlayer)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue