diff --git a/alvr/server/cpp/platform/win32/OvrDirectModeComponent.cpp b/alvr/server/cpp/platform/win32/OvrDirectModeComponent.cpp index 75e439211b..ebe12d2665 100644 --- a/alvr/server/cpp/platform/win32/OvrDirectModeComponent.cpp +++ b/alvr/server/cpp/platform/win32/OvrDirectModeComponent.cpp @@ -194,6 +194,7 @@ void OvrDirectModeComponent::Present(vr::SharedTextureHandle_t syncTexture) if (!pSyncTexture) { Warn("[VDispDvr] SyncTexture is NULL!\n"); + m_presentMutex.unlock(); return; } @@ -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; } }