Skip to content

Commit 942e27f

Browse files
Merge branch 'topic/#538' into 'master'
Add missing defensive code See merge request eng/ide/gnatstudio!867
2 parents 8b50fd7 + 269fff6 commit 942e27f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

builder/src/build_command_manager-console_writers.adb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,11 @@ package body Build_Command_Manager.Console_Writers is
185185
UTF8 : constant String := Unknown_To_UTF8 (Item, Success'Access);
186186
begin
187187
if Success then
188-
Self.Console.Insert_With_Links_Protected (UTF8, Add_LF => False);
188+
if Self.Console /= null then
189+
Self.Console.Insert_With_Links_Protected (UTF8, Add_LF => False);
190+
end if;
189191
Tools_Output_Parser (Self.all).Parse_Standard_Output (UTF8, Command);
190-
else
192+
elsif Self.Console /= null then
191193
Self.Console.Get_Console_Messages_Window.Insert
192194
("Could not convert process output to UTF-8",
193195
Mode => Error);

0 commit comments

Comments
 (0)