Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Don't bother checking S_OK here, it'll work in falling through.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Oct 26, 2011
1 parent 74e6e66 commit 6f8718f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/windows/SDL_windows.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6f8718f

Please sign in to comment.