=?UTF-8?Q?Gabriel=20Iv=C4=83ncescu=20?=: shell32/autocomplete: Check the edit control in ResetEnumerator instead of whether the object is initialized.

Alexandre Julliard julliard at winehq.org
Thu Nov 29 15:33:00 CST 2018


Module: wine
Branch: master
Commit: da2e51b3a6b725d0ba75952843d72d0a8d35785f
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=da2e51b3a6b725d0ba75952843d72d0a8d35785f

Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date:   Wed Nov 28 18:27:49 2018 +0200

shell32/autocomplete: Check the edit control in ResetEnumerator instead of whether the object is initialized.

An autocomplete object can be destroyed and detached from the edit control and
still survive, if there are still references to it (even though it's useless).

Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/shell32/autocomplete.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/shell32/autocomplete.c b/dlls/shell32/autocomplete.c
index 9292eec..6c013a8 100644
--- a/dlls/shell32/autocomplete.c
+++ b/dlls/shell32/autocomplete.c
@@ -1181,7 +1181,7 @@ static HRESULT WINAPI IAutoCompleteDropDown_fnResetEnumerator(
 
     TRACE("(%p)\n", This);
 
-    if (This->initialized)
+    if (This->hwndEdit)
     {
         free_enum_strs(This);
         if ((This->options & ACO_AUTOSUGGEST) && IsWindowVisible(This->hwndListBox))




More information about the wine-cvs mailing list