Fix crash due to empty channel name

This commit is contained in:
郑佩茹
2022-09-23 14:02:51 -06:00
parent 5600e94e55
commit f88f49471a

View File

@@ -186,7 +186,10 @@ void SuggestWhatToDoAction::spam(
{ {
strToLower(msg); strToLower(msg);
} }
chn->Say(bot->GetGUID(), msg.c_str(), LANG_UNIVERSAL); if (chn->GetName().length() > 0)
{
chn->Say(bot->GetGUID(), msg.c_str(), LANG_UNIVERSAL);
}
} }
} }
} }