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; }