[PATCH 4/4] shell32/autocomplete: Check the edit control in ResetEnumerator instead of whether the object is initialized
Gabriel Ivăncescu
gabrielopcode at gmail.com
Wed Nov 28 10:27:49 CST 2018
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>
---
I'm not aware of anything that depends on this, I just thought about
it and realized it was wrong in such corner cases. This is the correct
approach. Sorry for the oversight.
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))
--
2.19.1
More information about the wine-devel
mailing list