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()