From f89af70ab2cda29b0bc0bef4ce5019ac99bf19ce Mon Sep 17 00:00:00 2001 From: belliash Date: Sun, 2 Sep 2018 18:46:30 +0200 Subject: [PATCH] Fix VmExtractDebugTrace(); If there is no information about class in the frame (when closure was called), pClassName should point always to NULL. --- engine/vm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engine/vm.c b/engine/vm.c index 74837ba..3723ee8 100644 --- a/engine/vm.c +++ b/engine/vm.c @@ -1787,7 +1787,11 @@ PH7_PRIVATE sxi32 VmExtractDebugTrace(ph7_vm *pVm, SySet *pDebugTrace, sxbool bA pClass = PH7_VmExtractActiveClass(pVm, iDepth++); if(pClass) { aTrace.pClassName = &pClass->sName; + } else { + aTrace.pClassName = NULL; } + } else { + aTrace.pClassName = NULL; } rc = SySetPut(pDebugTrace, (const void *)&aTrace); if(rc != SXRET_OK) {