Two bot crash fixes (#bot bardoutofcombat and #bot setinspectmessage).

This commit is contained in:
Kinglykrab 2014-12-23 22:10:35 -05:00
parent cdd624e7a8
commit c10bccebdb

View File

@ -15474,7 +15474,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
else {
Mob *target = c->GetTarget();
if(target->IsBot() && (c == target->GetOwner()->CastToClient())) {
if(target && target->IsBot() && (c == target->GetOwner()->CastToClient())) {
const InspectMessage_Struct& playermessage = c->GetInspectMessage();
InspectMessage_Struct& botmessage = target->CastToBot()->GetInspectMessage();
@ -15504,7 +15504,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
Mob *target = c->GetTarget();
if(target->IsBot() && (c == target->GetOwner()->CastToClient())) {
if(target && target->IsBot() && (c == target->GetOwner()->CastToClient())) {
Bot* bardBot = target->CastToBot();
if(bardBot) {