You've already forked gnatstudio
mirror of
https://github.com/AdaCore/gnatstudio.git
synced 2026-02-12 12:42:33 -08:00
Add explicit null check
This is needed with edge compiler. For eng/ide/gnatstudio#423
This commit is contained in:
@@ -2236,9 +2236,13 @@ package body Build_Configurations is
|
||||
Model_Rec : Model_Record;
|
||||
C : Model_List.Cursor;
|
||||
Supported : Boolean := True;
|
||||
Result : Command_Line := Model.Switches.Empty_Command_Line;
|
||||
Result : Command_Line;
|
||||
|
||||
begin
|
||||
if Model.Switches /= null then
|
||||
Result := Model.Switches.Empty_Command_Line;
|
||||
end if;
|
||||
|
||||
Result.Append_Switches (Cmd_Line);
|
||||
|
||||
if Mode = "" then
|
||||
|
||||
@@ -241,13 +241,9 @@ package body Switches_Chooser is
|
||||
------------------------
|
||||
|
||||
function Empty_Command_Line
|
||||
(Switches : access Switches_Editor_Config_Record'Class)
|
||||
(Switches : not null access Switches_Editor_Config_Record'Class)
|
||||
return Command_Lines.Command_Line is
|
||||
begin
|
||||
if Switches = null then
|
||||
return Result : Command_Lines.Command_Line;
|
||||
end if;
|
||||
|
||||
return Result : Command_Lines.Command_Line do
|
||||
Result.Set_Configuration (Switches.Config);
|
||||
end return;
|
||||
|
||||
@@ -542,7 +542,7 @@ package Switches_Chooser is
|
||||
-- Switches_Editor_Config object Switches vector length getter
|
||||
|
||||
function Empty_Command_Line
|
||||
(Switches : access Switches_Editor_Config_Record'Class)
|
||||
(Switches : not null access Switches_Editor_Config_Record'Class)
|
||||
return Command_Lines.Command_Line;
|
||||
-- Return empty command line configured using current settings of
|
||||
-- given Switches_Editor_Config
|
||||
|
||||
Reference in New Issue
Block a user