Dangling pointer crash in TreeView


#1

If I remove the contents(deleteRootItem() etc.) of a TreeView, and then rebuild a new tree (Without deleting the TreeView itself), it looks like buttonUnderMouse is left pointing to a deleted component…
Have just upgraded from v1.46 which didn’t have this issue… but it looks like buttonUnderMouse was only added fairly recently, so I guess that’s not too surprising.

I was temporarily just going to set buttonUnderMouse to 0 in deleteRootItem() but i’m not sure if that will fix all possible issues.


#2

Thanks for flagging that one - it does look like it could get into situations like that. I’ll take a look and check something in v. soon…