mirror of
https://github.com/araxiaonline/mod-transmog.git
synced 2026-06-13 02:32:22 -04:00
fix(cs_transmog.cpp): add null-check preventing crash (#145)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user