fix(Scripts/Commands): Fix crash when using additem from console (#18559)
This commit is contained in:
@@ -1692,7 +1692,7 @@ public:
|
|||||||
|
|
||||||
Item* item = playerTarget->StoreNewItem(dest, itemId, true);
|
Item* item = playerTarget->StoreNewItem(dest, itemId, true);
|
||||||
|
|
||||||
Player* p = handler->GetSession()->GetPlayer();
|
Player* p = handler->GetSession() ? handler->GetSession()->GetPlayer() : nullptr;
|
||||||
// remove binding (let GM give it to another player later)
|
// remove binding (let GM give it to another player later)
|
||||||
if (p && p == playerTarget)
|
if (p && p == playerTarget)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user