Don't bother checking S_OK here, it'll work in falling through.
This commit is contained in:
parent
62babe19c4
commit
61d3a02eab
1 changed files with 3 additions and 2 deletions
|
@ -42,10 +42,11 @@ WIN_SetError(const char *prefix)
|
|||
HRESULT
|
||||
WIN_CoInitialize(void)
|
||||
{
|
||||
const HRESULT hr = CoInitialize(NULL);
|
||||
|
||||
/* S_FALSE means success, but someone else already initialized. */
|
||||
/* You still need to call CoUninitialize in this case! */
|
||||
const HRESULT hr = CoInitialize(NULL);
|
||||
if ((hr == S_OK) || (hr == S_FALSE)) {
|
||||
if (hr == S_FALSE) {
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue