mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-06 17:47:26 +01:00
SynEdit: fix avl for create-root-node returns nil
git-svn-id: trunk@63447 -
This commit is contained in:
parent
821b66e4c2
commit
7aa4a1ccfc
@ -38,6 +38,7 @@ Known Issues:
|
||||
unit SynEditMiscClasses;
|
||||
|
||||
{$I synedit.inc}
|
||||
{$INLINE off}
|
||||
|
||||
interface
|
||||
|
||||
@ -3039,6 +3040,7 @@ var
|
||||
function CreateRoot: TSynSizedDifferentialAVLNode; inline;
|
||||
begin
|
||||
Result := CreateNode(APosition);
|
||||
if Result <> nil then
|
||||
Result.FPositionOffset := APosition;
|
||||
SetRoot(Result);
|
||||
end;
|
||||
@ -3072,6 +3074,7 @@ begin
|
||||
if (Result = nil) then begin
|
||||
if (AMode = afmCreate) then begin
|
||||
Result := CreateRoot;
|
||||
if Result <> nil then
|
||||
aStartPosition := aStartPosition + Result.FPositionOffset;
|
||||
end;
|
||||
exit;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user