mirror of
https://github.com/edubart/otclient.git
synced 2025-12-25 01:07:12 +01:00
fix a crash
This commit is contained in:
@@ -45,11 +45,13 @@ void Game::loginWorld(const std::string& account, const std::string& password, c
|
||||
|
||||
void Game::cancelLogin()
|
||||
{
|
||||
if(m_protocolGame->isConnected()) {
|
||||
logout();
|
||||
} else if(m_protocolGame->isConnecting()) {
|
||||
m_protocolGame->disconnect();
|
||||
m_protocolGame.reset();
|
||||
if(m_protocolGame) {
|
||||
if(m_protocolGame->isConnected()) {
|
||||
logout();
|
||||
} else if(m_protocolGame->isConnecting()) {
|
||||
m_protocolGame->disconnect();
|
||||
m_protocolGame.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user