Fix segmentation fault when trying to access array element.
The build was successful.
Details
The build was successful.
Details
This commit is contained in:
parent
140bd35f93
commit
47cca096bc
|
@ -695,6 +695,15 @@ PH7_PRIVATE sxi32 PH7_VmCreateClassInstanceFrame(
|
||||||
SyMemBackendPoolFree(&pVm->sAllocator, pVmAttr);
|
SyMemBackendPoolFree(&pVm->sAllocator, pVmAttr);
|
||||||
return SXERR_MEM;
|
return SXERR_MEM;
|
||||||
}
|
}
|
||||||
|
if(pAttr->nType & MEMOBJ_HASHMAP) {
|
||||||
|
ph7_hashmap *pMap;
|
||||||
|
pMap = PH7_NewHashmap(&(*pVm), 0, 0);
|
||||||
|
if(pMap == 0) {
|
||||||
|
SyMemBackendPoolFree(&pVm->sAllocator, pMap);
|
||||||
|
return SXERR_MEM;
|
||||||
|
}
|
||||||
|
pMemObj->x.pOther = pMap;
|
||||||
|
}
|
||||||
MemObjSetType(pMemObj, pAttr->nType);
|
MemObjSetType(pMemObj, pAttr->nType);
|
||||||
pVmAttr->nIdx = pMemObj->nIdx;
|
pVmAttr->nIdx = pMemObj->nIdx;
|
||||||
if(SySetUsed(&pAttr->aByteCode) > 0) {
|
if(SySetUsed(&pAttr->aByteCode) > 0) {
|
||||||
|
|
Loading…
Reference in New Issue