Skip to content

Commit

Permalink
[core] fix crash when data is null on eagle
Browse files Browse the repository at this point in the history
  • Loading branch information
jianhan-he committed Dec 12, 2018
1 parent 09de7ad commit 778165a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion weex_core/Source/core/data_render/vm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ void VM::RunFrame(ExecState *exec_state, Frame frame, Value *ret) {
if (IsValueRef(b)) {
b = b->var;
}
if (!IsClassInstance(b) && !IsClass(b) && !IsArray(b) && !IsTable(b) && !IsString(b)) {
if (!IsClassInstance(b) && !IsClass(b) && !IsArray(b) && !IsTable(b) && !IsString(b) && !IsNil(b)) {
throw VMExecError("Type Error For Class Instance Or Class With OP_CODE [OP_GETMEMBER]");
}
if (!IsString(c)) {
Expand Down Expand Up @@ -721,6 +721,9 @@ void VM::RunFrame(ExecState *exec_state, Frame frame, Value *ret) {
}
}
}
else if (IsNil(b)) {
SetNil(a);
}
else {
// only can find class static funcs;
Variables *statics = ValueTo<ClassDescriptor>(b)->statics_.get();
Expand Down

0 comments on commit 778165a

Please sign in to comment.