summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/TopToolBar/src/toolbar.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/plugins/TopToolBar/src/toolbar.cpp b/plugins/TopToolBar/src/toolbar.cpp
index ba97fe87fe..24d8076b7f 100644
--- a/plugins/TopToolBar/src/toolbar.cpp
+++ b/plugins/TopToolBar/src/toolbar.cpp
@@ -617,9 +617,15 @@ static int OnModulesLoad(WPARAM wParam, LPARAM lParam)
static int OnShutdown(WPARAM wParam, LPARAM lParam)
{
- if (g_ctrl && g_ctrl->hWnd) {
- DestroyWindow(g_ctrl->hWnd);
- g_ctrl->hWnd = NULL;
+ if (g_ctrl) {
+ if (g_ctrl->hFrame) {
+ CallService(MS_CLIST_FRAMES_REMOVEFRAME, (WPARAM)g_ctrl->hFrame, 0);
+ g_ctrl->hFrame = 0;
+ }
+ else if (g_ctrl->hWnd) {
+ DestroyWindow(g_ctrl->hWnd);
+ g_ctrl->hWnd = NULL;
+ }
}
return 0;