mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 02:29:21 +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]);
|
||||
// Return if CleanCursorPos is before Tree.Root.StartNode.
|
||||
// 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;
|
||||
if FindDeepestNodeAtPos(CleanCursorPos,false)=nil then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user