forked from teamnwah/openmw-tes3coop
Fix crash in dialogue filter if local variables are not configured
This could happen e.g. by 'some_npc_in_remote_cell->forcegreeting'
This commit is contained in:
parent
36c192a1dd
commit
e8c6a3b225
1 changed files with 2 additions and 1 deletions
|
@ -193,7 +193,8 @@ bool MWDialogue::Filter::testFunctionLocal(const MWDialogue::SelectWrapper& sele
|
||||||
return false; // shouldn't happen, we checked that variable has a type above, so must exist
|
return false; // shouldn't happen, we checked that variable has a type above, so must exist
|
||||||
|
|
||||||
const MWScript::Locals& locals = mActor.getRefData().getLocals();
|
const MWScript::Locals& locals = mActor.getRefData().getLocals();
|
||||||
|
if (locals.isEmpty())
|
||||||
|
return select.selectCompare(0);
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case 's': return select.selectCompare (static_cast<int> (locals.mShorts[index]));
|
case 's': return select.selectCompare (static_cast<int> (locals.mShorts[index]));
|
||||||
|
|
Loading…
Reference in a new issue