Module: wine Branch: master Commit: e3b942003410e8a96b15034990af3e55f95d23d5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e3b942003410e8a96b15034990...
Author: Aric Stewart aric@codeweavers.com Date: Thu Jun 18 18:15:24 2009 +0900
comctl32: In COMBOEX_FindStringExact do not try to get text from invalid items.
---
dlls/comctl32/comboex.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c index 8a0652c..2156896 100644 --- a/dlls/comctl32/comboex.c +++ b/dlls/comctl32/comboex.c @@ -860,10 +860,12 @@ COMBOEX_FindStringExact (COMBOEX_INFO *infoPtr, INT start, LPCWSTR str) /* now search from after starting loc and wrapping back to start */ for(i=start+1; i<count; i++) { CBE_ITEMDATA *item = get_item_data(infoPtr, i); + if ((LRESULT)item == CB_ERR) continue; if (cmptext(COMBOEX_GetText(infoPtr, item), str) == 0) return i; } for(i=0; i<=start; i++) { CBE_ITEMDATA *item = get_item_data(infoPtr, i); + if ((LRESULT)item == CB_ERR) continue; if (cmptext(COMBOEX_GetText(infoPtr, item), str) == 0) return i; } return CB_ERR;