It’s crashing for me. I have a bunch of items in the tree, and an item losing focus can cause the tree to get updated.
So if you click on item B, the item A which is losing focus says, hey, update the tree!
But in the treeview on line:172
if ((itemsToKeep[i] || (comp == Component::getComponentUnderMouse() && comp->isMouseButtonDown()))
&& isParentOf (comp))
const TreeViewItem* const item = (TreeViewItem*) rowComponentItems.getUnchecked(i);
Item B says, hey I’m under the mouse and the button is down, keep me! But he’s already been deleted.
item is a bad pointer and everything crashes.
What is the correct way to handle this?