[Bug Fix] Fix possible #proximity crash. (#1639)

This commit is contained in:
Kinglykrab 2021-10-24 17:50:43 -04:00 committed by GitHub
parent 62253cc016
commit 1c5f9f2e0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6097,7 +6097,7 @@ void command_push(Client *c, const Seperator *sep)
void command_proximity(Client *c, const Seperator *sep)
{
if (!c->GetTarget() && !c->GetTarget()->IsNPC()) {
if (!c->GetTarget() || (c->GetTarget() && !c->GetTarget()->IsNPC())) {
c->Message(Chat::White, "You must target an NPC");
return;
}