mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 01:39:25 +02:00
IDE: Sanity check when loading LPS run modes. Issue #35410, patch from Ondrej.
git-svn-id: trunk@61051 -
This commit is contained in:
parent
0b48576ddd
commit
0a6a5d2b43
@ -366,7 +366,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
|
||||
|
||||
@ -385,7 +385,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