Core/Misc: Fix static analysis issues

Fix various coverity reported issues

(cherry picked from commit 925557d1c0)
This commit is contained in:
jackpoz
2017-12-08 15:14:51 +01:00
committed by Shauren
parent 42c65c3bc2
commit bf5be28396
2 changed files with 4 additions and 1 deletions

View File

@@ -16476,6 +16476,7 @@ void Player::RemoveRewardedQuest(uint32 questId, bool update /*= true*/)
// Remove seasonal quest also
Quest const* qInfo = sObjectMgr->GetQuestTemplate(questId);
ASSERT(qInfo);
if (qInfo->IsSeasonal())
{
uint16 eventId = qInfo->GetEventIdForQuest();

View File

@@ -2943,8 +2943,10 @@ void Map::GetFullTerrainStatusForPosition(PhaseShift const& phaseShift, float x,
if (vmapData.areaInfo)
data.areaInfo = boost::in_place(vmapData.areaInfo->adtId, vmapData.areaInfo->rootId, vmapData.areaInfo->groupId, vmapData.areaInfo->mogpFlags);
float mapHeight = VMAP_INVALID_HEIGHT;
GridMap* gmap = GetGrid(terrainMapId, x, y);
float mapHeight = gmap->getHeight(x, y);
if (gmap)
mapHeight = gmap->getHeight(x, y);
// area lookup
AreaTableEntry const* areaEntry = nullptr;