Core/Misc: Fix issues reported by static analysis

Coverity defect IDs: 1023036, 1022620
This commit is contained in:
jackpoz committed 2015-04-19 17:45:55 +02:00
1 parent 444cc12610
commit c3b8800cf7
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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