[Crash] Fix #summon crash (#3608)

* [Crash] Summon crash fix

* [Crash] Fix summon crash
This commit is contained in:
Chris Miles 2023-10-07 13:59:56 -05:00 committed by GitHub
parent 68cb94b39c
commit b5b0e53da2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -64,6 +64,11 @@ void command_summon(Client *c, const Seperator *sep)
return;
}
if (!target) {
c->Message(Chat::White, "You must have a target to summon.");
return;
}
c->Message(
Chat::White,
fmt::format(

View File

@ -5114,7 +5114,7 @@ std::string Mob::GetTargetDescription(Mob* target, uint8 description_type, uint1
auto d = fmt::format(
"{}",
(
this == target ?
target && this == target ?
self_return :
fmt::format(
"{} ({})",