Fix FS9 lobby connetion not being cleaned up properly

This commit is contained in:
Roland Winklmeier
2014-11-04 22:20:01 +01:00
parent d3d09b8251
commit 16bf3f047a

View File

@@ -33,6 +33,24 @@ namespace BlackSimPlugin
CLobbyClient::~CLobbyClient()
{
if (m_directPlayPeer)
{
m_directPlayPeer->Close(DPNCLOSE_IMMEDIATE);
m_directPlayPeer->Release();
}
if (m_deviceAddress)
m_deviceAddress->Release();
if (m_hostAddress)
m_hostAddress->Release();
if (m_dpLobbyClient)
{
m_dpLobbyClient->ReleaseApplication(DPLHANDLE_ALLCONNECTIONS, 0);
m_dpLobbyClient->Close(0);
}
CoUninitialize();
}