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?