Make sure protocol manager exists when requesting
This commit is contained in:
parent
c5cf87071c
commit
6c18664967
@ -79,7 +79,8 @@ bool Protocol::checkDataSize(Event* event, unsigned int minimum_size)
|
|||||||
*/
|
*/
|
||||||
void Protocol::requestStart()
|
void Protocol::requestStart()
|
||||||
{
|
{
|
||||||
ProtocolManager::lock()->requestStart(shared_from_this());
|
if (auto pm = ProtocolManager::lock())
|
||||||
|
pm->requestStart(shared_from_this());
|
||||||
} // requestStart
|
} // requestStart
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -87,7 +88,8 @@ void Protocol::requestStart()
|
|||||||
*/
|
*/
|
||||||
void Protocol::requestPause()
|
void Protocol::requestPause()
|
||||||
{
|
{
|
||||||
ProtocolManager::lock()->requestPause(shared_from_this());
|
if (auto pm = ProtocolManager::lock())
|
||||||
|
pm->requestPause(shared_from_this());
|
||||||
} // requestPause
|
} // requestPause
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -95,7 +97,8 @@ void Protocol::requestPause()
|
|||||||
*/
|
*/
|
||||||
void Protocol::requestUnpause()
|
void Protocol::requestUnpause()
|
||||||
{
|
{
|
||||||
ProtocolManager::lock()->requestUnpause(shared_from_this());
|
if (auto pm = ProtocolManager::lock())
|
||||||
|
pm->requestUnpause(shared_from_this());
|
||||||
} // requestUnpause
|
} // requestUnpause
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -103,7 +106,8 @@ void Protocol::requestUnpause()
|
|||||||
*/
|
*/
|
||||||
void Protocol::requestTerminate()
|
void Protocol::requestTerminate()
|
||||||
{
|
{
|
||||||
ProtocolManager::lock()->requestTerminate(shared_from_this());
|
if (auto pm = ProtocolManager::lock())
|
||||||
|
pm->requestTerminate(shared_from_this());
|
||||||
} // requestTerminate
|
} // requestTerminate
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@ -369,7 +369,7 @@ void ClientLobby::update(float dt)
|
|||||||
break;
|
break;
|
||||||
case DONE:
|
case DONE:
|
||||||
m_state = EXITING;
|
m_state = EXITING;
|
||||||
ProtocolManager::lock()->requestTerminate(shared_from_this());
|
requestTerminate();
|
||||||
break;
|
break;
|
||||||
case EXITING:
|
case EXITING:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user