msctf: Correct return value from GetValue.

This commit is contained in:
Aric Stewart 2009-07-09 08:16:14 -05:00 committed by Alexandre Julliard
parent f628146cfe
commit 34751fbdf2
1 changed files with 3 additions and 5 deletions

View File

@ -530,17 +530,15 @@ static HRESULT WINAPI Compartment_SetValue(ITfCompartment *iface,
static HRESULT WINAPI Compartment_GetValue(ITfCompartment *iface,
VARIANT *pvarValue)
{
HRESULT hr = S_OK;
Compartment *This = (Compartment *)iface;
TRACE("(%p) %p\n",This, pvarValue);
if (!pvarValue)
return E_INVALIDARG;
pvarValue->n1.n2.vt = VT_EMPTY;
if (!This->variant.n1.n2.vt == VT_EMPTY)
hr = VariantCopy(pvarValue,&This->variant);
return hr;
VariantInit(pvarValue);
if (V_VT(&This->variant) == VT_EMPTY) return S_FALSE;
return VariantCopy(pvarValue,&This->variant);
}
static const ITfCompartmentVtbl ITfCompartment_Vtbl ={