From 26697f242127fe67dfc67b1d998e540c212eca48 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 20 Feb 2018 14:19:01 +0000 Subject: [PATCH] Ensure global mouse listener is removed when SidePanel is destructed --- modules/juce_gui_basics/layout/juce_SidePanel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/juce_gui_basics/layout/juce_SidePanel.cpp b/modules/juce_gui_basics/layout/juce_SidePanel.cpp index ac3fa1d173..70c21dc178 100644 --- a/modules/juce_gui_basics/layout/juce_SidePanel.cpp +++ b/modules/juce_gui_basics/layout/juce_SidePanel.cpp @@ -50,6 +50,8 @@ SidePanel::SidePanel (StringRef title, int width, bool positionOnLeft, SidePanel::~SidePanel() { + Desktop::getInstance().removeGlobalMouseListener (this); + if (parent != nullptr) parent->removeComponentListener (this); }