Again: Accept lphc == NULL in listboxes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I found another place where our implementation accessed a NULL lphc

Changelog:
	controls/listbox.c: LISTBOX_HandleLButtonDownCombo/
	                    ComboLBWndProc_common
        Accept lphc == NULL in more places

This makes the properities list boxes in Xilinx Webpack work. As there are
other places where lphc == NULL is handled, it shouldn't be the wrong way.
The application was somehow unwilling to get debugged. Running the suite
from the commandline, it entered the debugger and looped endless. Running it
with winedbg, the loader hanged. Only with some application ("tkstartwdog
-C", also know as a problem causer in other EDA applications) of the
toolchain as a separate process and starting the target process ("_pn.exe -C
WebPACK4.2 -U MTOC.chm") in the debugger showed up the problem. Running the
target process in a normal wine process made the application catch the
exeption, show up a messagebox about that and crash in another place.

Bye

-- 
Uwe Bonnes                bon@elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Index: wine/controls/listbox.c
===================================================================
RCS file: /home/wine/wine/controls/listbox.c,v
retrieving revision 1.83
diff -u -w -r1.83 listbox.c
--- wine/controls/listbox.c	13 Jun 2002 19:20:43 -0000	1.83
+++ wine/controls/listbox.c	20 Jun 2002 10:15:00 -0000
@@ -2040,6 +2040,7 @@
        /* MousePos is in client, resume normal processing */
         if (msg == WM_LBUTTONDOWN)
         {
+           if (pDescr->lphc)
            pDescr->lphc->droppedIndex = pDescr->nb_items ? pDescr->selected_item : -1;
            return LISTBOX_HandleLButtonDown( hwnd, pDescr, wParam, x, y);
         }
@@ -3075,7 +3076,7 @@
                 return LISTBOX_Create( hwnd, lphc );
             }
         case WM_MOUSEMOVE:
-            if ( (TWEAK_WineLook > WIN31_LOOK) &&
+            if ( (TWEAK_WineLook > WIN31_LOOK) && (lphc) &&
                  (CB_GETTYPE(lphc) != CBS_SIMPLE) )
             {
                 POINT   mousePos;
@@ -3156,7 +3157,7 @@
         case WM_NCACTIVATE:
             return FALSE;
         case WM_KEYDOWN:
-            if( CB_GETTYPE(lphc) != CBS_SIMPLE )
+            if((lphc) && ( CB_GETTYPE(lphc) != CBS_SIMPLE) )
             {
                 /* for some reason(?) Windows makes it possible to
                  * show/hide ComboLBox by sending it WM_KEYDOWNs */


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux