Fix segmentation fault on Program::__construct() call.
The build was successful.
Details
The build was successful.
Details
This commit is contained in:
parent
f8a47d2838
commit
407bcf5a29
|
@ -5274,14 +5274,14 @@ PH7_PRIVATE sxi32 PH7_VmByteCodeExec(ph7_vm *pVm) {
|
|||
if(pInstance == 0) {
|
||||
PH7_VmMemoryError(&(*pVm));
|
||||
}
|
||||
/* Enable garbage collector */
|
||||
pInstance->iRef--;
|
||||
/* Check if a constructor is available */
|
||||
pMethod = PH7_ClassExtractMethod(pClass, "__construct", sizeof("__construct") - 1);
|
||||
if(pMethod) {
|
||||
/* Call the class constructor */
|
||||
PH7_VmCallClassMethod(&(*pVm), pInstance, pMethod, 0, 0, 0);
|
||||
}
|
||||
/* Enable garbage collector */
|
||||
pInstance->iRef--;
|
||||
pArgs = ph7_new_array(&(*pVm));
|
||||
sArgv = ph7_new_scalar(&(*pVm));
|
||||
if(!pArgs || !sArgv) {
|
||||
|
|
Loading…
Reference in New Issue