mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-15 20:59:16 +02:00
Codetools: Do not crash when invoking ident completion on empty editor. Issue #39685.
This commit is contained in:
parent
39df877063
commit
9da44c1c9b
@ -2163,7 +2163,7 @@ begin
|
|||||||
[btSetIgnoreErrorPos]);
|
[btSetIgnoreErrorPos]);
|
||||||
// Return if CleanCursorPos is before Tree.Root.StartNode.
|
// Return if CleanCursorPos is before Tree.Root.StartNode.
|
||||||
// For example a comment at the beginning of a unit.
|
// For example a comment at the beginning of a unit.
|
||||||
if Tree.Root.StartPos>CleanCursorPos then
|
if (Tree.Root=nil) or (Tree.Root.StartPos>CleanCursorPos) then
|
||||||
Exit;
|
Exit;
|
||||||
if FindDeepestNodeAtPos(CleanCursorPos,false)=nil then
|
if FindDeepestNodeAtPos(CleanCursorPos,false)=nil then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user