mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Don't use the target list if the world is NULL
This commit is contained in:
parent
3f9bed938e
commit
2dbe61789d
1 changed files with 7 additions and 1 deletions
|
@ -1769,7 +1769,13 @@ void ScriptVM::Execute(ScriptVariable *data, int dataSize, str label)
|
|||
|
||||
case OP_UN_TARGETNAME:
|
||||
// retrieve the target name
|
||||
targetList = world->GetExistingTargetList(m_VMStack.GetTop().stringValue());
|
||||
if (world) {
|
||||
targetList = world->GetExistingTargetList(m_VMStack.GetTop().stringValue());
|
||||
} else {
|
||||
// Added in OPM
|
||||
// don't use the target list if the world is NULL
|
||||
targetList = NULL;
|
||||
}
|
||||
|
||||
if (!targetList || !targetList->list.NumObjects()) {
|
||||
str targetname = m_VMStack.GetTop().stringValue();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue