Debugger, testsuite: fix crash if logging is disabled

git-svn-id: trunk@61446 -
This commit is contained in:
martin 2019-06-22 17:09:36 +00:00
parent a326525422
commit 745d2b94d1

View File

@ -545,10 +545,11 @@ end;
procedure TDBGTestCase.LogError(const s: string; CopyToTestLogger: Boolean);
begin
if GetLogActive or (TestControlGetWriteLog = wlOnError) then
if GetLogActive or (TestControlGetWriteLog = wlOnError) then begin
CreateLog;
FLogFile.WriteLnToFile(EscapeText(s));
//writeln(FLogFile, EscapeText(s));
FLogFile.WriteLnToFile(EscapeText(s));
//writeln(FLogFile, EscapeText(s));
end;
if CopyToTestLogger then
TestLogger.DebugLn(s);
end;