sudara / melatonin_inspector

A JUCE module that gives you the ability to inspect and visually edit (non-destructively) components in your UI.
MIT License
145 stars 17 forks source link

juce::LookAndFeel destructor asserts on quit #15

Closed leighmarble closed 3 years ago

leighmarble commented 3 years ago

Trying this in a standalone app, the assert in the juce::LookAndFeel class gets hit when I quit it.

This assertion is triggered if you try to delete a LookAndFeel object while something is still using it!

Fixed that by adding to the MelatoninInspector's destructor:

    setLookAndFeel (nullptr);
    overlay.setLookAndFeel (nullptr);
    panel.setLookAndFeel (nullptr);
sudara commented 3 years ago

@leighmarble Hey, thanks for officially being the first person to use the module that I know of :) And for the report and solution!

Ah right, the look and feel is being destructed before the inspector itself. The overlay and panel should be deleted before the LNF, so I thiiiink we just need that first line. Fix incoming!