aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2015-04-19 17:41:09 +0200
committerjackpoz <giacomopoz@gmail.com>2015-04-19 17:45:55 +0200
commitc3b8800cf7763fc6798c6b1ea601a23db8087fec (patch)
tree1ae6fecc09fb8683f3afedabea1b0396a08cadf2 /src
parent444cc12610af936fdd4ca9c599e8a9ec74deba42 (diff)
Core/Misc: Fix issues reported by static analysis
Coverity defect IDs: 1023036, 1022620
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp2
-rw-r--r--src/server/game/Loot/LootMgr.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index e3740f63848..7c2272c0d08 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -5930,7 +5930,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
case 55677:
{
// Dispel Magic shares spellfamilyflag with abolish disease
- if (procSpell->SpellIconID != 74)
+ if (!procSpell || procSpell->SpellIconID != 74)
return false;
if (!target || !target->IsFriendlyTo(this))
return false;
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index 52b866850a6..ba4e4713458 100644
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -853,7 +853,7 @@ ByteBuffer& operator<<(ByteBuffer& b, LootItem const& li)
{
b << uint32(li.itemid);
b << uint32(li.count); // nr of items of this type
- b << uint32(sObjectMgr->GetItemTemplate(li.itemid)->DisplayInfoID);
+ b << uint32(ASSERT_NOTNULL(sObjectMgr->GetItemTemplate(li.itemid))->DisplayInfoID);
b << uint32(li.randomSuffix);
b << uint32(li.randomPropertyId);
//b << uint8(0); // slot type - will send after this function call