Accept lphc == NULL in listboxes (now with patch and to right list)

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Mon Jun 17 10:51:07 CDT 2002


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 at 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 -r1.83 listbox.c
--- wine/controls/listbox.c	13 Jun 2002 19:20:43 -0000	1.83
+++ wine/controls/listbox.c	17 Jun 2002 12:27:27 -0000
@@ -2040,7 +2040,8 @@
        /* MousePos is in client, resume normal processing */
         if (msg == WM_LBUTTONDOWN)
         {
-           pDescr->lphc->droppedIndex = pDescr->nb_items ? pDescr->selected_item : -1;
+           if (pDescr->lphc)
+               pDescr->lphc->droppedIndex = pDescr->nb_items ? pDescr->selected_item : -1;
            return LISTBOX_HandleLButtonDown( hwnd, pDescr, wParam, x, y);
         }
         else if (pDescr->style & LBS_NOTIFY)
@@ -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;



More information about the wine-patches mailing list