mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 10:39:20 +02:00
LCL: Add a sanity check to TTreeNode.Unbind.
git-svn-id: trunk@64143 -
This commit is contained in:
parent
2a0df745f0
commit
92568b2c46
@ -1300,6 +1300,7 @@ begin
|
|||||||
|
|
||||||
// remove single select
|
// remove single select
|
||||||
Selected:=false;
|
Selected:=false;
|
||||||
|
TheTreeView:=Nil;
|
||||||
// invalidate caches of TreeView and if root item, remove from TreeView.Items
|
// invalidate caches of TreeView and if root item, remove from TreeView.Items
|
||||||
if Owner<>nil then begin
|
if Owner<>nil then begin
|
||||||
Owner.ClearCache;
|
Owner.ClearCache;
|
||||||
@ -1347,6 +1348,7 @@ begin
|
|||||||
ReAllocMem(FParent.FItems,SizeOf(Pointer)*FParent.FCapacity);
|
ReAllocMem(FParent.FItems,SizeOf(Pointer)*FParent.FCapacity);
|
||||||
end;
|
end;
|
||||||
if FParent.Count=0 then begin
|
if FParent.Count=0 then begin
|
||||||
|
Assert(Assigned(TheTreeView), 'TTreeNode.Unbind: TheTreeView=Nil.');
|
||||||
TheTreeView.BeginUpdate;
|
TheTreeView.BeginUpdate;
|
||||||
try
|
try
|
||||||
FParent.Expanded:=false;
|
FParent.Expanded:=false;
|
||||||
|
Loading…
Reference in New Issue
Block a user