diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index b8c76e51313..e08a15f8dfc 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -5860,6 +5860,10 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam) { SendMessageW (infoPtr->hwndNotify, WM_COMMAND, MAKEWPARAM(infoPtr->buttons[nHit].idCommand, BN_CLICKED), (LPARAM)hwnd); + + /* In case we have just been destroyed... */ + if(!IsWindow(hwnd)) + return 0; } }