codetools: fixed tests when no pas2js found

(cherry picked from commit 8f307159a6)
This commit is contained in:
mattias 2021-12-03 12:05:40 +01:00 committed by Maxim Ganetsky
parent 011b97d0e0
commit 870d5ac69f

View File

@ -112,7 +112,8 @@ end;
procedure TCustomTestPas2js.TearDown;
begin
FCode:=nil;
CodeToolBoss.DefineTree.RemoveDefineTemplate(VirtualDirDefines);
if VirtualDirDefines<>nil then
CodeToolBoss.DefineTree.RemoveDefineTemplate(VirtualDirDefines);
inherited TearDown;
end;