mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-28 09:17:15 +00:00
Fix potential crash in #iteminfo
This commit is contained in:
+4
-1
@@ -4339,7 +4339,10 @@ void command_goto(Client *c, const Seperator *sep)
|
|||||||
void command_iteminfo(Client *c, const Seperator *sep)
|
void command_iteminfo(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
auto inst = c->GetInv()[EQEmu::legacy::SlotCursor];
|
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();
|
auto item = inst->GetItem();
|
||||||
if (!item) {
|
if (!item) {
|
||||||
Log.Out(Logs::General, Logs::Inventory, "(%s) Command #iteminfo processed an item with no data pointer");
|
Log.Out(Logs::General, Logs::Inventory, "(%s) Command #iteminfo processed an item with no data pointer");
|
||||||
|
|||||||
Reference in New Issue
Block a user