Fix crash in PlayerbotSecurity

This commit is contained in:
郑佩茹
2022-11-18 10:24:29 -07:00
parent 7c16f2ae48
commit 42bbe9dcdc

View File

@@ -231,7 +231,14 @@ bool PlayerbotSecurity::CheckLevelFor(PlayerbotSecurityLevel level, bool silent,
out << "I am currently leading a group. I can invite you if you want.";
break;
case PLAYERBOT_DENY_NOT_LEADER:
out << "I am in a group with " << botAI->GetGroupMaster()->GetName() << ". You can ask him for invite.";
if (botAI->GetGroupMaster())
{
out << "I am in a group with " << botAI->GetGroupMaster()->GetName() << ". You can ask him for invite.";
}
else
{
out << "I am in a group with someone else. You can ask him for invite.";
}
break;
case PLAYERBOT_DENY_BG:
out << "I am in a queue for BG. Will do it later";