From ba90ee11fa83a1cb7d908d64cb50197afa6a8aeb Mon Sep 17 00:00:00 2001 From: Ben Hillis Date: Wed, 26 Nov 2025 07:59:33 -0800 Subject: [PATCH] cleanup: remove invalid m_deviceHostSupport checks (#13787) Co-authored-by: Ben Hillis --- src/windows/service/exe/GuestDeviceManager.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/windows/service/exe/GuestDeviceManager.cpp b/src/windows/service/exe/GuestDeviceManager.cpp index 73426abe..475e7fca 100644 --- a/src/windows/service/exe/GuestDeviceManager.cpp +++ b/src/windows/service/exe/GuestDeviceManager.cpp @@ -52,13 +52,11 @@ GUID GuestDeviceManager::AddHdvShareWithOptions( GUID GuestDeviceManager::AddNewDevice(_In_ const GUID& deviceId, _In_ const wil::com_ptr& server, _In_ PCWSTR tag) { - THROW_HR_IF(E_NOT_VALID_STATE, !m_deviceHostSupport); return m_deviceHostSupport->AddNewDevice(deviceId, server, tag); } void GuestDeviceManager::AddRemoteFileSystem(_In_ REFCLSID clsid, _In_ PCWSTR tag, _In_ const wil::com_ptr& server) { - THROW_HR_IF(E_NOT_VALID_STATE, !m_deviceHostSupport); m_deviceHostSupport->AddRemoteFileSystem(clsid, tag, server); } @@ -134,16 +132,12 @@ GuestDeviceManager::DirectoryObjectLifetime GuestDeviceManager::CreateSectionObj wil::com_ptr GuestDeviceManager::GetRemoteFileSystem(_In_ REFCLSID clsid, _In_ std::wstring_view tag) { - THROW_HR_IF(E_NOT_VALID_STATE, !m_deviceHostSupport); return m_deviceHostSupport->GetRemoteFileSystem(clsid, tag); } void GuestDeviceManager::Shutdown() try { - if (m_deviceHostSupport) - { - m_deviceHostSupport->Shutdown(); - } + m_deviceHostSupport->Shutdown(); } CATCH_LOG()