Fix double deletion of CLobbyClient during shutdown

This commit is contained in:
Roland Rossgotterer
2019-10-16 16:25:16 +02:00
committed by Klaus Basan
parent 1051cc5751
commit 84248fc1b0

View File

@@ -537,10 +537,15 @@ namespace BlackSimPlugin
delete host;
}
static void cleanupLobbyClient(CLobbyClient *lobbyClient)
{
delete lobbyClient;
}
CSimulatorFs9Factory::CSimulatorFs9Factory(QObject *parent) :
QObject(parent),
m_fs9Host(new CFs9Host(this), cleanupFs9Host),
m_lobbyClient(new CLobbyClient(this))
m_lobbyClient(new CLobbyClient, cleanupLobbyClient)
{
registerMetadata();