Commit 61d3a02e authored by Ryan C. Gordon's avatar Ryan C. Gordon

Don't bother checking S_OK here, it'll work in falling through.

parent 62babe19
...@@ -42,10 +42,11 @@ WIN_SetError(const char *prefix) ...@@ -42,10 +42,11 @@ WIN_SetError(const char *prefix)
HRESULT HRESULT
WIN_CoInitialize(void) WIN_CoInitialize(void)
{ {
const HRESULT hr = CoInitialize(NULL);
/* S_FALSE means success, but someone else already initialized. */ /* S_FALSE means success, but someone else already initialized. */
/* You still need to call CoUninitialize in this case! */ /* You still need to call CoUninitialize in this case! */
const HRESULT hr = CoInitialize(NULL); if (hr == S_FALSE) {
if ((hr == S_OK) || (hr == S_FALSE)) {
return S_OK; return S_OK;
} }
......
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