From b3da1ac0cdc2e28b38dd633286a0e1c10b4eb8c1 Mon Sep 17 00:00:00 2001
From: Ulrich Czekalla <uczekalla@codeweavers.com>
Date: Tue, 9 Jan 2001 20:49:53 +0000
Subject: [PATCH] Ensure there is an edit control when we reset contents.

---
 controls/combo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/controls/combo.c b/controls/combo.c
index 11c78e38c47..b8869937525 100644
--- a/controls/combo.c
+++ b/controls/combo.c
@@ -2091,7 +2091,7 @@ static LRESULT ComboWndProc_locked( WND* pWnd, UINT message,
 	case CB_RESETCONTENT16: 
 	case CB_RESETCONTENT:
 		SendMessageW(lphc->hWndLBox, LB_RESETCONTENT, 0, 0);
-                if( CB_HASSTRINGS(lphc) )
+                if( (lphc->wState & CBF_EDIT) && CB_HASSTRINGS(lphc) )
 		{
 		    static const WCHAR empty_stringW[] = { 0 };
                     SendMessageW(lphc->hWndEdit, WM_SETTEXT, 0, (LPARAM)empty_stringW);
-- 
GitLab