Bug in ComboBox destructor when showing pop-up!

Create a component containing a combobox.

When running, activate the combo box list pop-up “menu”, and close the container component.

Raises this assertion…!

    jassert (! menuActive); // deleting the combo box while it's in use? Probably not a great idea.

Looks like the ComboBox implementation might require a bit more in its tidy-up code?



ok, try the version I’ve just checked in.

It’s a bit of a messy situation because the combobox is being deleted whilst it’s still in a modal loop higher up the stack, but I’ve added a deletion check to bail out if that happens.

Cheers Jules! :slight_smile:

BTW, might this happen hypothetically for a pop-up menu in a TextEdit component…?

Well it could happen hypothetically for any combobox, because even in a modal loop there’s nothing stopping them being deleted by a timer or event callback. I think the fix I did is pretty safe though.