mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 19:29:34 +02:00
codetools: ReduceCompilerDirectives fixed crash
git-svn-id: trunk@56279 -
This commit is contained in:
parent
73db65e4ae
commit
6dc2571a4c
@ -925,6 +925,8 @@ begin
|
||||
}
|
||||
NextSubNode:=SubNode.NextSkipChilds;
|
||||
DebugLn(['TCompilerDirectivesTree.MoveIfNotThenDefsUp IFDEF + DEFINE => the define is not needed']);
|
||||
if NextNode=SubNode then
|
||||
NextNode:=NextNode.NextSkipChilds;
|
||||
DisableDefineNode(SubNode,Changed);
|
||||
SubNode:=nil;
|
||||
end;
|
||||
@ -972,6 +974,8 @@ begin
|
||||
// the name was not read after it was set -> disable the define
|
||||
// in the block
|
||||
DebugLn(['TCompilerDirectivesTree.MoveIfNotThenDefsUp old DEFINE is not needed anymore']);
|
||||
if NextNode=LastDefineNode then
|
||||
NextNode:=NextNode.NextSkipChilds;
|
||||
DisableDefineNode(LastDefineNode,Changed);
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user