Commit 7a6c0d2f authored by Andrew Nguyen's avatar Andrew Nguyen Committed by Alexandre Julliard

shell32: Fix initial reference count for a new IAutoComplete instance.

parent 57e4e608
......@@ -121,33 +121,27 @@ static void create_listbox(IAutoCompleteImpl *This)
HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv)
{
IAutoCompleteImpl *lpac;
HRESULT hr;
if (pUnkOuter && !IsEqualIID (riid, &IID_IUnknown))
return CLASS_E_NOAGGREGATION;
return CLASS_E_NOAGGREGATION;
lpac = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IAutoCompleteImpl));
if (!lpac)
return E_OUTOFMEMORY;
if (!lpac)
return E_OUTOFMEMORY;
lpac->ref = 1;
lpac->lpVtbl = &acvt;
lpac->lpDropDownVtbl = &acdropdownvt;
lpac->enabled = TRUE;
lpac->enumstr = NULL;
lpac->options = ACO_AUTOAPPEND;
lpac->wpOrigEditProc = NULL;
lpac->hwndListBox = NULL;
lpac->txtbackup = NULL;
lpac->quickComplete = NULL;
if (FAILED (IUnknown_QueryInterface (_IUnknown_ (lpac), riid, ppv))) {
IUnknown_Release (_IUnknown_ (lpac));
return E_NOINTERFACE;
}
hr = IUnknown_QueryInterface(_IUnknown_ (lpac), riid, ppv);
IUnknown_Release(_IUnknown_ (lpac));
TRACE("-- (%p)->\n",lpac);
return S_OK;
return hr;
}
/**************************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment