mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-16 08:46:09 +00:00
chore(Core/Misc): nullptr cleanup (#11467)
This commit is contained in:
@@ -3429,7 +3429,7 @@ void ObjectMgr::LoadPetLevelInfo()
|
||||
|
||||
PetLevelInfo*& pInfoMapEntry = _petInfoStore[creature_id];
|
||||
|
||||
if (pInfoMapEntry == nullptr)
|
||||
if (!pInfoMapEntry)
|
||||
pInfoMapEntry = new PetLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)];
|
||||
|
||||
// data for level 1 stored in [0] array element, ...
|
||||
@@ -8497,7 +8497,7 @@ GameTele const* ObjectMgr::GetGameTele(std::string_view name) const
|
||||
{
|
||||
if (itr->second.wnameLow == wname)
|
||||
return &itr->second;
|
||||
else if (alt == nullptr && itr->second.wnameLow.find(wname) != std::wstring::npos)
|
||||
else if (!alt && itr->second.wnameLow.find(wname) != std::wstring::npos)
|
||||
alt = &itr->second;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user