[Client] Don't crash when receiving certain packets from NULL players

This commit is contained in:
David Cernat 2017-05-27 22:32:28 +03:00
parent 2e45203bbb
commit 6918ae7bc7
3 changed files with 9 additions and 3 deletions

View file

@ -20,9 +20,11 @@ namespace mwmp
{ {
// Entire faction membership cannot currently be requested from players // Entire faction membership cannot currently be requested from players
} }
else else if (player != 0)
{
static_cast<LocalPlayer*>(player)->setFactions(); static_cast<LocalPlayer*>(player)->setFactions();
} }
}
}; };
} }

View file

@ -24,9 +24,11 @@ namespace mwmp
{ {
// Entire journal cannot currently be requested from players // Entire journal cannot currently be requested from players
} }
else else if (player != 0)
{
static_cast<LocalPlayer*>(player)->addJournalItems(); static_cast<LocalPlayer*>(player)->addJournalItems();
} }
}
}; };
} }

View file

@ -20,9 +20,11 @@ namespace mwmp
{ {
// Entire list of topics cannot currently be requested from players // Entire list of topics cannot currently be requested from players
} }
else else if (player != 0)
{
static_cast<LocalPlayer*>(player)->addTopics(); static_cast<LocalPlayer*>(player)->addTopics();
} }
}
}; };
} }