fix(Scripts/Commands): Fix crash when using additem from console (#18559)

This commit is contained in:
Andrew
2024-03-16 04:56:42 -03:00
committed by GitHub
parent 64f372fca3
commit 452ca39249

View File

@@ -1692,7 +1692,7 @@ public:
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)
if (p && p == playerTarget)
{