Skip to content

Commit

Permalink
Stop an at-exit jassert from not releasing LnF ref
Browse files Browse the repository at this point in the history
  • Loading branch information
baconpaul committed May 14, 2024
1 parent e0efa8a commit 02a34ad
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src-juce/AWConsolidatedEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,8 @@ struct Picker : public juce::Component, public juce::TextEditor::Listener
void parentHierarchyChanged() override
{
// We will ahve our LnF changed
resetColors();
if (getParentComponent())
resetColors();
}
void resetColors()
{
Expand Down Expand Up @@ -832,8 +833,9 @@ struct ParamDisp : juce::Component, juce::TextEditor::Listener
void parentHierarchyChanged() override
{
// We will ahve our LnF changed
resetColors();
}
if (getParentComponent())
resetColors();
};

void resetColors()
{
Expand Down Expand Up @@ -1394,7 +1396,13 @@ AWConsolidatedAudioProcessorEditor::AWConsolidatedAudioProcessorEditor(

AWConsolidatedAudioProcessorEditor::~AWConsolidatedAudioProcessorEditor()
{
// release any references to the look and feel
setLookAndFeel(&juce::LookAndFeel::getDefaultLookAndFeel());

// detatch from processor prop file
lnf->propFileWeak = nullptr;

// stop lsitenres and timers
juce::Desktop::getInstance().removeDarkModeSettingListener(this);
idleTimer->stopTimer();
}
Expand Down

0 comments on commit 02a34ad

Please sign in to comment.