Fix segmentation fault.
All checks were successful
The build was successful.

This commit is contained in:
Rafal Kupiec 2018-08-28 19:07:07 +02:00
parent d97c0a6634
commit 8f92782fe2
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4

View File

@ -1813,6 +1813,7 @@ PH7_PRIVATE sxi32 VmExtractDebugTrace(ph7_vm *pVm, SySet *pDebugTrace, sxbool bA
*/
PH7_PRIVATE sxi32 VmExtractPeekDebugTrace(ph7_vm *pVm, VmDebugTrace *pDebug) {
SySet pTrace;
SySetInit(&pTrace, &pVm->sAllocator, sizeof(VmDebugTrace));
/* Populate debug stacktrace */
if(VmExtractDebugTrace(&(*pVm), &pTrace, FALSE) != SXRET_OK || SySetGetNextEntry(&pTrace, (void **)&pDebug) != SXRET_OK) {
return SXERR_MEM;