mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 04:52:38 +02:00
IDE: fixed unitializeed variable
git-svn-id: trunk@48453 -
This commit is contained in:
parent
7003a55fb6
commit
46d3e09630
@ -656,14 +656,15 @@ begin
|
||||
if Result <> nil then
|
||||
break;
|
||||
end;
|
||||
if Result = nil then // should never happen
|
||||
Result := AnUnitInfo.OpenEditorInfo[0]
|
||||
else begin // ToDo: replace uninitialized 'j' with something.
|
||||
if Result = nil then
|
||||
// should never happen
|
||||
Result := AnUnitInfo.OpenEditorInfo[0];
|
||||
if Result<>nil then begin
|
||||
// WantedTopLine
|
||||
if (WantedTopLine>0)
|
||||
and (AnUnitInfo.OpenEditorInfo[j].EditorComponent<>nil) then
|
||||
AnUnitInfo.OpenEditorInfo[j].EditorComponent.TopLine:=WantedTopLine;
|
||||
and (Result.EditorComponent<>nil) then
|
||||
Result.EditorComponent.TopLine:=WantedTopLine;
|
||||
end;
|
||||
// ToDo: WantedTopLine
|
||||
end;
|
||||
|
||||
function TFileOpener.OpenResource: TModalResult;
|
||||
|
Loading…
Reference in New Issue
Block a user