When the TCustomTree.Clear is called, it is only freeing the shape, and not setting them to nil.
Could you please include the following change in your next code release.
TeeTree.pas
- TCustomTree.Clear
// 9th line from the Procedure Decleration
//Previous Code
for t:=0 to Shapes.Count-1 do Shapes[t].Free;
//Change To
for t:=0 to Shapes.Count-1 do Shapes.FreeAndNillItem(t);
This will fix some problems I have been having when checking if a shape is assigned.