mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 09:59:10 +02:00
codetools: fixed crash if Result not in function
git-svn-id: trunk@48414 -
This commit is contained in:
parent
9ece157c2a
commit
c292a5e843
@ -7339,7 +7339,7 @@ var
|
||||
// -> check if in a function
|
||||
if fdfExtractOperand in Params.Flags then Params.AddOperandPart('Result');
|
||||
ProcNode:=StartNode;
|
||||
while not NodeIsFunction(ProcNode) do
|
||||
while (ProcNode<>nil) and not NodeIsFunction(ProcNode) do
|
||||
ProcNode:=ProcNode.Parent;
|
||||
if (ProcNode<>nil) then begin
|
||||
if IsEnd and (fdfFindVariable in StartFlags) then begin
|
||||
|
Loading…
Reference in New Issue
Block a user