Debugger: Fix crash when tracing without a file output

This commit is contained in:
Vicki Pfau 2020-11-28 20:43:43 -08:00
parent 69a8aa5520
commit 98799dae6d
1 changed files with 4 additions and 2 deletions

View File

@ -753,8 +753,10 @@ static bool _doTrace(struct CLIDebugger* debugger) {
--debugger->traceRemaining; --debugger->traceRemaining;
} }
if (!debugger->traceRemaining) { if (!debugger->traceRemaining) {
debugger->traceVf->close(debugger->traceVf); if (debugger->traceVf) {
debugger->traceVf = NULL; debugger->traceVf->close(debugger->traceVf);
debugger->traceVf = NULL;
}
return false; return false;
} }
return true; return true;