Module: wine Branch: master Commit: 765791387393c5251744b88e7615766c22b09ad7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=765791387393c5251744b88e76...
Author: Felix Nawothnig flexo@holycrap.org Date: Fri Apr 6 00:27:21 2007 +0200
comctl32: Allow destruction of toolbar in BN_CLICKED handler.
---
dlls/comctl32/toolbar.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index b8c76e5..e08a15f 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; } }