ListBoxMouseMoveSelector bug

Hi Jules, hope you’re well.

I believe this is what is required to replicate a crash:

  1. set listbox->setMouseMoveSelectsRows(true);
  2. later on, once the listbox is visible, set listbox->setMouseMoveSelectsRows(false);

I inspected this a bit, and here’s what happens: an instance of ListBoxMouseMoveSelector mouse-listens to the listbox in its constructor, but after getting deleted with 2) the listbox tries to update its mouse listeners - modifying a freed object. So the quick fix is to add these lines at juce_ListBox:243:

~ListBoxMouseMoveSelector() {

and all is well.


1 Like

Hi @Daven,

Thanks for the fix, I’ve added this to the develop branch.


1 Like