mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 05:49:23 +02:00
IDE: Sanity check when loading LPS run modes. Issue #35410
git-svn-id: branches/fixes_2_0@62930 -
This commit is contained in:
parent
6299e12cab
commit
bbc8c655bd
@ -353,7 +353,7 @@ function TRunParamsOptions.Load(XMLConfig: TXMLConfig; const Path: string;
|
||||
var
|
||||
Cnt, I: Integer;
|
||||
NewMode: TRunParamsOptionsMode;
|
||||
ModePath: string;
|
||||
ModePath, NewActiveModeName: string;
|
||||
begin
|
||||
//don't clear! needed for merging lpi and lps
|
||||
|
||||
@ -372,7 +372,11 @@ begin
|
||||
|
||||
if ASaveIn=rpsLPS then
|
||||
begin
|
||||
ActiveModeName := XMLConfig.GetValue(Path + 'Modes/ActiveMode', '');
|
||||
NewActiveModeName := XMLConfig.GetValue(Path + 'Modes/ActiveMode', '');
|
||||
// sanity check -> modes from LPI could be modified independently on LPS and
|
||||
// NewActiveModeName doesn't have to exist any more
|
||||
if Assigned(Find(NewActiveModeName)) then
|
||||
ActiveModeName := NewActiveModeName;
|
||||
if (GetActiveMode=nil) and (Count>0) then
|
||||
ActiveModeName := Modes[0].Name;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user