mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-09 21:00:00 +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
|
||||
Selected:=false;
|
||||
TheTreeView:=Nil;
|
||||
// invalidate caches of TreeView and if root item, remove from TreeView.Items
|
||||
if Owner<>nil then begin
|
||||
Owner.ClearCache;
|
||||
@ -1347,6 +1348,7 @@ begin
|
||||
ReAllocMem(FParent.FItems,SizeOf(Pointer)*FParent.FCapacity);
|
||||
end;
|
||||
if FParent.Count=0 then begin
|
||||
Assert(Assigned(TheTreeView), 'TTreeNode.Unbind: TheTreeView=Nil.');
|
||||
TheTreeView.BeginUpdate;
|
||||
try
|
||||
FParent.Expanded:=false;
|
||||
|
Loading…
Reference in New Issue
Block a user