Fix for toolbar notifying after destruction

Dave Hawkes daveh-wine at cadlink.com
Wed Dec 5 13:09:52 CST 2001


This fix prevents MFC from asserting when a bogus notify is sent during
toolbar destruction.

Dave Hawkes

-------------- next part --------------
Index: comctl32/toolbar.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/toolbar.c,v
retrieving revision 1.95
diff -u -r1.95 toolbar.c
--- comctl32/toolbar.c	2001/12/01 00:37:41	1.95
+++ comctl32/toolbar.c	2001/12/05 17:31:47
@@ -205,6 +205,9 @@
 static INT
 TOOLBAR_SendNotify (NMHDR *nmhdr, TOOLBAR_INFO *infoPtr, UINT code)
 {
+	if(!IsWindow(infoPtr->hwndSelf))
+	    return 0;   /* we have just been destroyed */
+	
     nmhdr->idFrom = GetDlgCtrlID (infoPtr->hwndSelf);
     nmhdr->hwndFrom = infoPtr->hwndSelf;
     nmhdr->code = code;


More information about the wine-patches mailing list