1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-05 18:27:47 +00:00

failing nullptr check should abort the function.

This commit is contained in:
Mordred 2023-02-09 12:55:45 +01:00
parent 07f0bd31bd
commit 9d647e2bde

View file

@ -179,7 +179,10 @@ void FreeCompanyMgr::sendFcInviteList( Entity::Player& player )
// fill master character data
auto masterCharacter = server.getPlayer( fc->getMasterId() );
if( !masterCharacter )
{
Logger::error( "FreeCompanyMgr: Unable to look up master character#{}!", fc->getMasterId() );
return;
}
inviteListPacket->data().MasterCharacter.GrandCompanyID = masterCharacter->getGc();
inviteListPacket->data().MasterCharacter.CharacterID = masterCharacter->getCharacterId();