Closes #1090: Don't throw an exception if a cell has no region in GetPCCell

This commit is contained in:
scrawl 2014-01-08 19:57:13 +01:00
parent 154fae9f25
commit bf02b77c1d

View file

@ -107,7 +107,8 @@ namespace MWScript
std::string current = cell->mName;
if (!(cell->mData.mFlags & ESM::Cell::Interior) && current.empty())
if (!(cell->mData.mFlags & ESM::Cell::Interior) && current.empty()
&& !cell->mRegion.empty())
{
const ESM::Region *region =
MWBase::Environment::get().getWorld()->getStore().get<ESM::Region>().find (cell->mRegion);