mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 05:38:25 +02:00
Codetools: Prevent a crash in FindIdentififerReference on the name of a program. Issue #40753.
This commit is contained in:
parent
9ad00fb5a7
commit
280ada98b2
@ -6630,7 +6630,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