Hi Phil,

On Thursday 08 September 2005 19:23, Phil Krylov wrote:
> * Every double click on a folder in the listview destroys this listview
>   object (effectively destroying all underlying structures), creates a new
>   one, and returns control to the place where double click notification was
>   sent by the old listview (notify_hdr() function in listview.c). This time
>   the old listview and its structures are already destroyed, but we
>   continue to access them, exception!

Thanks a lot, that really saved my day. I've spend some hours chasing this bug 
already, but to no avail. 

> Here is a patch which adds checking if the window has been destroyed at
> that point. I don't know if it is acceptable but it fixes the problem.

Wouldn't it be enough to call notify_click after notify_itemactivate? I've 
attached a modification of your patch, which does just this. Seems to work 
fine for me.
 
Bye,
-- 
Michael Jung
[EMAIL PROTECTED]
Index: dlls/comctl32/listview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
retrieving revision 1.429
diff -u -p -r1.429 listview.c
--- dlls/comctl32/listview.c	30 Aug 2005 10:07:17 -0000	1.429
+++ dlls/comctl32/listview.c	8 Sep 2005 20:07:34 -0000
@@ -8094,11 +8094,14 @@ static LRESULT LISTVIEW_LButtonDblClk(LI
 
     /* send NM_DBLCLK notification */
     LISTVIEW_HitTest(infoPtr, &htInfo, TRUE, FALSE);
-    notify_click(infoPtr, NM_DBLCLK, &htInfo);
 
     /* To send the LVN_ITEMACTIVATE, it must be on an Item */
     if(htInfo.iItem != -1) notify_itemactivate(infoPtr,&htInfo);
 
+    /* The current listview might be destroyed in notify_click,
+     * so don't use infoPtr any more after this call. */
+    notify_click(infoPtr, NM_DBLCLK, &htInfo);
+	
     return 0;
 }
 


Reply via email to