From a8db4532d020e4fbd051c69145477019d0836742 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 13 Aug 2016 15:46:35 -0400 Subject: [PATCH] Fix potential crash in #iteminfo --- zone/command.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zone/command.cpp b/zone/command.cpp index 95770097d..16001d670 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -4339,7 +4339,10 @@ void command_goto(Client *c, const Seperator *sep) void command_iteminfo(Client *c, const Seperator *sep) { auto inst = c->GetInv()[EQEmu::legacy::SlotCursor]; - if (!inst) { c->Message(13, "Error: You need an item on your cursor for this command"); } + if (!inst) { + c->Message(13, "Error: You need an item on your cursor for this command"); + return; + } auto item = inst->GetItem(); if (!item) { Log.Out(Logs::General, Logs::Inventory, "(%s) Command #iteminfo processed an item with no data pointer");