mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 00:59:31 +02:00
SynEdit: Ifdef Markup: add safety check, do not est commented nodes
git-svn-id: trunk@41711 -
This commit is contained in:
parent
1ff1a2384f
commit
70e441594c
@ -2882,6 +2882,10 @@ begin
|
||||
if (e = nil) then DebugLn([ 'SetNodeState did not find a matching node ', ALinePos, '/', 'AstartPos',AstartPos, ' ', dbgs(AState), ' #',copy(Lines[ALinePos-1],1,20)]);
|
||||
//assert(e.NodeType in [idnIfdef, idnElseIf], 'SetNodeState did not find a node (e.NodeType <> idnIfdef)');
|
||||
//if (e = nil) or not(e.NodeType in [idnIfdef, idnElseIf]) then
|
||||
if (e <> nil) and (e.NodeType in [idnCommentedNode]) then begin
|
||||
DebugLn([ 'SetNodeState did find a COMMENTED node ', ALinePos, '/', 'AstartPos',AstartPos, ' ', dbgs(AState), ' #',copy(Lines[ALinePos-1],1,20)]);
|
||||
exit;
|
||||
end;
|
||||
if (e = nil) then
|
||||
exit;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user