From 870d5ac69ffe371cd5dc2812189cf83cf106b1e2 Mon Sep 17 00:00:00 2001 From: mattias Date: Fri, 3 Dec 2021 12:05:40 +0100 Subject: [PATCH] codetools: fixed tests when no pas2js found (cherry picked from commit 8f307159a6478737cafbdd501ceb9365887aba59) --- components/codetools/tests/testctpas2js.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/codetools/tests/testctpas2js.pas b/components/codetools/tests/testctpas2js.pas index 86f9cd0b8b..df79d655db 100644 --- a/components/codetools/tests/testctpas2js.pas +++ b/components/codetools/tests/testctpas2js.pas @@ -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;