Fix crash starting a new game.

This commit is contained in:
cc9cii 2014-05-25 07:50:19 +10:00
parent c9011f707f
commit 4f94a31b54

View file

@ -88,6 +88,12 @@ namespace MWScript
virtual void execute (Interpreter::Runtime& runtime)
{
if (!MWBase::Environment::get().getWorld()->getPlayerPtr().isInCell())
{
runtime.push (0);
return;
}
bool interior =
!MWBase::Environment::get().getWorld()->getPlayerPtr().getCell()->getCell()->isExterior();