Tryeing to call a non-instantiated object should result in an error.
The build was successful.
Details
The build was successful.
Details
This commit is contained in:
parent
f72d6c3922
commit
369cadfcda
|
@ -4383,6 +4383,9 @@ static sxi32 VmByteCodeExec(
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if(pNos->iFlags & MEMOBJ_OBJ) {
|
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;
|
ph7_class *pClass;
|
||||||
/* Class already instantiated */
|
/* Class already instantiated */
|
||||||
pThis = (ph7_class_instance *)pNos->x.pOther;
|
pThis = (ph7_class_instance *)pNos->x.pOther;
|
||||||
|
|
Loading…
Reference in New Issue