1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

TreeView: Reset itemUnderMouse when deleting TreeViewItems to avoid dereferencing dangling pointers

This commit is contained in:
reuk 2022-01-04 19:21:33 +00:00
parent 4f9a9c7bfc
commit cd34f1b00b
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11

View file

@ -313,6 +313,9 @@ public:
if (iter != itemComponents.end())
{
if (itemUnderMouse == iter->get())
itemUnderMouse = nullptr;
if (isMouseDraggingInChildComp (*(iter->get())))
owner.hideDragHighlight();