Skip to content

Commit ba90ee1

Browse files
benhillisBen Hillis
andauthored
cleanup: remove invalid m_deviceHostSupport checks (#13787)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
1 parent 4207cc8 commit ba90ee1

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/windows/service/exe/GuestDeviceManager.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,11 @@ GUID GuestDeviceManager::AddHdvShareWithOptions(
5252

5353
GUID GuestDeviceManager::AddNewDevice(_In_ const GUID& deviceId, _In_ const wil::com_ptr<IPlan9FileSystem>& server, _In_ PCWSTR tag)
5454
{
55-
THROW_HR_IF(E_NOT_VALID_STATE, !m_deviceHostSupport);
5655
return m_deviceHostSupport->AddNewDevice(deviceId, server, tag);
5756
}
5857

5958
void GuestDeviceManager::AddRemoteFileSystem(_In_ REFCLSID clsid, _In_ PCWSTR tag, _In_ const wil::com_ptr<IPlan9FileSystem>& server)
6059
{
61-
THROW_HR_IF(E_NOT_VALID_STATE, !m_deviceHostSupport);
6260
m_deviceHostSupport->AddRemoteFileSystem(clsid, tag, server);
6361
}
6462

@@ -134,16 +132,12 @@ GuestDeviceManager::DirectoryObjectLifetime GuestDeviceManager::CreateSectionObj
134132

135133
wil::com_ptr<IPlan9FileSystem> GuestDeviceManager::GetRemoteFileSystem(_In_ REFCLSID clsid, _In_ std::wstring_view tag)
136134
{
137-
THROW_HR_IF(E_NOT_VALID_STATE, !m_deviceHostSupport);
138135
return m_deviceHostSupport->GetRemoteFileSystem(clsid, tag);
139136
}
140137

141138
void GuestDeviceManager::Shutdown()
142139
try
143140
{
144-
if (m_deviceHostSupport)
145-
{
146-
m_deviceHostSupport->Shutdown();
147-
}
141+
m_deviceHostSupport->Shutdown();
148142
}
149143
CATCH_LOG()

0 commit comments

Comments
 (0)