mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 04:40:54 +02:00
Codetools: Prevent a crash in FindIdentififerReference on the name of a program. Issue #40753.
(cherry picked from commit 280ada98b2
)
This commit is contained in:
parent
2db606a4ed
commit
ee4aebfa7d
@ -6445,7 +6445,7 @@ var
|
||||
//debugln(' Found=',dbgs(Found));
|
||||
Node:=Params.NewNode;
|
||||
if Found and (Node<>nil) then begin
|
||||
if ((Node.Desc=ctnUseUnit) or (Node.Parent.Desc=ctnUseUnit))
|
||||
if ((Node.Desc=ctnUseUnit) or ((Node.Parent<>nil) and (Node.Parent.Desc=ctnUseUnit)))
|
||||
and (Params.NewCodeTool=Self) then begin
|
||||
// identifier is a unit reference
|
||||
if (DeclarationNode.Desc=ctnSrcName)
|
||||
|
Loading…
Reference in New Issue
Block a user