Avoid crash.
This commit is contained in:
parent
68f5259f4d
commit
3243f81f10
@ -36,7 +36,9 @@ GameEventsProtocol::~GameEventsProtocol()
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
bool GameEventsProtocol::notifyEvent(Event* event)
|
bool GameEventsProtocol::notifyEvent(Event* event)
|
||||||
{
|
{
|
||||||
if (event->getType() != EVENT_TYPE_MESSAGE)
|
// Avoid crash in case that we still receive race events when
|
||||||
|
// the race is actually over.
|
||||||
|
if (event->getType() != EVENT_TYPE_MESSAGE || !World::getWorld())
|
||||||
return true;
|
return true;
|
||||||
NetworkString &data = event->data();
|
NetworkString &data = event->data();
|
||||||
if (data.size() < 1) // for token and type
|
if (data.size() < 1) // for token and type
|
||||||
|
Loading…
x
Reference in New Issue
Block a user