Browse Source

fix this pointer in op_callfunc_this

Jeff Hutchinson 7 years ago
parent
commit
c75eecbf53
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Engine/source/console/codeInterpreter.cpp

+ 1 - 1
Engine/source/console/codeInterpreter.cpp

@@ -2511,7 +2511,7 @@ OPCodeReturn CodeInterpreter::op_callfunc_this(U32 &ip)
    ip += 2;
    CSTK.getArgcArgv(fnName, &mCallArgc, &mCallArgv);
 
-   Namespace *ns = mThisObject->getNamespace();
+   Namespace *ns = mThisObject ? mThisObject->getNamespace() : NULL;
    if (ns)
       mNSEntry = ns->lookup(fnName);
    else