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@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))