Browse Source

Tryeing to call a non-instantiated object should result in an error.

pull/50/head
Rafal Kupiec 3 years ago
parent
commit
369cadfcda
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      engine/vm.c

+ 3
- 0
engine/vm.c View File

@ -4383,6 +4383,9 @@ static sxi32 VmByteCodeExec(
}
#endif
if(pNos->iFlags & MEMOBJ_OBJ) {
if(!pNos->x.pOther) {
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, "Call to non-instantiated object '$%z'", &sName);
}
ph7_class *pClass;
/* Class already instantiated */
pThis = (ph7_class_instance *)pNos->x.pOther;


Loading…
Cancel
Save