mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-28 04:02:25 +00:00
Fix potential crash in #iteminfo
This commit is contained in:
parent
ab35f8b842
commit
a8db4532d0
@ -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");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user