Skip to content

Commit

Permalink
Merge pull request Ourpalm#335 from NewbieGameCoder/master
Browse files Browse the repository at this point in the history
修正为空类对象可正常调用类成员函数,导致报错信息容易引起错误的理解的bug
  • Loading branch information
liiir1985 committed Jun 9, 2020
2 parents b232306 + 9698179 commit c468cab
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ILRuntime/Runtime/Intepreter/ILIntepreter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ public object Run(ILMethod method, object instance, object[] p)
{
arg--;
paramCnt++;
/// 为确保性能,暂时先确保开发的时候,安全检查完备。
/// 当然手机端运行时可能会出现为空的类对象可正常调用成员函数,导致成员函数里面访问成员变量报错时可能使得根据Log跟踪BUG时方向错误。
#if DEBUG && !DISABLE_ILRUNTIME_DEBUG
var thisObj = RetriveObject(arg, mStack);
if (thisObj == null)
throw new NullReferenceException();
#endif
}
unhandledException = false;
StackObject* objRef, objRef2, dst, val, a, b, arrRef;
Expand Down

0 comments on commit c468cab

Please sign in to comment.