Commit 9941a716 authored by Shaun Ren's avatar Shaun Ren Committed by Alexandre Julliard

sapi: Invoke AddRef in ISpVoice::SetVoice.

parent 5fccc408
......@@ -641,7 +641,6 @@ static HRESULT WINAPI spvoice_SetVoice(ISpVoice *iface, ISpObjectToken *token)
ISpTTSEngine *engine;
HRESULT hr;
TRACE("(%p, %p).\n", iface, token);
if (!token)
......@@ -649,6 +648,8 @@ static HRESULT WINAPI spvoice_SetVoice(ISpVoice *iface, ISpObjectToken *token)
if (FAILED(hr = create_default_token(SPCAT_VOICES, &token)))
return hr;
}
else
ISpObjectToken_AddRef(token);
hr = ISpObjectToken_CreateInstance(token, NULL, CLSCTX_ALL, &IID_ISpTTSEngine, (void **)&engine);
ISpObjectToken_Release(token);
......
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