22 Jun
2023
22 Jun
'23
4:45 a.m.
Huw Davies (@huw) commented about dlls/sapi/tts.c:
+ else + { + if (FAILED(IUnknown_QueryInterface(unk, &IID_ISpStreamFormat, (void **)&stream))) + { + if (FAILED(IUnknown_QueryInterface(unk, &IID_ISpObjectToken, (void **)&token))) + return E_INVALIDARG; + } + } + + if (!stream) + { + hr = ISpObjectToken_CreateInstance(token, NULL, CLSCTX_ALL, &IID_ISpStreamFormat, (void **)&stream); + ISpObjectToken_Release(token); + if (FAILED(hr)) + return hr; + } Wouldn't it make more sense to put this `!stream` block inside the `else` block above?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3128#note_36561