Skip to content

Commit

Permalink
unlock mutex in OvrDirectModeComponent::Present when returning early (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabwhy authored Aug 16, 2023
1 parent 7b6e66f commit 0586831
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions alvr/server/cpp/platform/win32/OvrDirectModeComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ void OvrDirectModeComponent::Present(vr::SharedTextureHandle_t syncTexture)
if (!pSyncTexture)
{
Warn("[VDispDvr] SyncTexture is NULL!\n");
m_presentMutex.unlock();
return;
}

Expand All @@ -209,6 +210,7 @@ void OvrDirectModeComponent::Present(vr::SharedTextureHandle_t syncTexture)
{
Debug("[VDispDvr] ACQUIRESYNC FAILED!!! hr=%d %p %ls\n", hr, hr, GetErrorStr(hr).c_str());
pKeyedMutex->Release();
m_presentMutex.unlock();
return;
}
}
Expand Down

0 comments on commit 0586831

Please sign in to comment.