From a4c246ab0ed561d615263e15662a0e12716c8b10 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sat, 24 Feb 2018 14:19:06 +0100 Subject: [PATCH] GreaseMonkey: Fix removing statusbar icon when unloading plugin --- src/plugins/GreaseMonkey/gm_manager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/GreaseMonkey/gm_manager.cpp b/src/plugins/GreaseMonkey/gm_manager.cpp index c840d9084..8e35ff0b0 100644 --- a/src/plugins/GreaseMonkey/gm_manager.cpp +++ b/src/plugins/GreaseMonkey/gm_manager.cpp @@ -298,6 +298,8 @@ void GM_Manager::mainWindowCreated(BrowserWindow* window) void GM_Manager::mainWindowDeleted(BrowserWindow* window) { - window->navigationBar()->removeToolButton(m_windows[window]); - delete m_windows.take(window); + GM_Icon *icon = m_windows.take(window); + window->statusBar()->removeButton(icon); + window->navigationBar()->removeToolButton(icon); + delete icon; }