mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 00:39:28 +02:00
IDE: fixed crash on word completion
git-svn-id: trunk@34799 -
This commit is contained in:
parent
a0912487d5
commit
ce2b09aa85
@ -8951,13 +8951,13 @@ var TempEditor: TSourceEditor;
|
|||||||
i:integer;
|
i:integer;
|
||||||
begin
|
begin
|
||||||
TempEditor:=GetActiveSE;
|
TempEditor:=GetActiveSE;
|
||||||
if SourceIndex=0 then begin
|
if (SourceIndex=0) and (TempEditor<>nil) then begin
|
||||||
Source:=TempEditor.EditorComponent.Lines;
|
Source:=TempEditor.EditorComponent.Lines;
|
||||||
end else begin
|
end else begin
|
||||||
i:=0;
|
i:=0;
|
||||||
while (i < SourceEditorCount) do begin
|
while (i < SourceEditorCount) do begin
|
||||||
if SourceEditors[i] <> TempEditor then dec(SourceIndex);
|
if SourceEditors[i] <> TempEditor then dec(SourceIndex);
|
||||||
if SourceIndex = 0 then begin
|
if SourceIndex <= 0 then begin
|
||||||
Source := SourceEditors[i].EditorComponent.Lines;
|
Source := SourceEditors[i].EditorComponent.Lines;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user