diff --git a/src/cs_transmog.cpp b/src/cs_transmog.cpp index 02871ca..d35c9fd 100644 --- a/src/cs_transmog.cpp +++ b/src/cs_transmog.cpp @@ -144,10 +144,12 @@ public: std::string itemQuality = tempStream.str(); std::string itemName = itemTemplate->Name1; - // get locale item name - int loc_idex = target->GetSession()->GetSessionDbLocaleIndex(); - if (ItemLocale const* il = sObjectMgr->GetItemLocale(itemId)) - ObjectMgr::GetLocaleString(il->Name, loc_idex, itemName); + if (target) { + // get locale item name + int loc_idex = target->GetSession()->GetSessionDbLocaleIndex(); + if (ItemLocale const* il = sObjectMgr->GetItemLocale(itemId)) + ObjectMgr::GetLocaleString(il->Name, loc_idex, itemName); + } std::string playerName = player->GetName(); std::string nameLink = handler->playerLink(playerName);