Remove some redundant explicit NULL checks for pointers before ´delete´ or ´delete[]´ calls since this check is done implicitly when deleting.

Also fixes a memory leak in .reload creature_template command

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-06-21 23:20:58 +02:00
parent 5c86cc2aee
commit 95ddfbd9e2
19 changed files with 47 additions and 94 deletions
+1 -2
View File
@@ -46,8 +46,7 @@ LFGQueue::~LFGQueue()
void LFGQueue::AddToQueue(uint64 guid, LfgQueueInfo* pqInfo)
{
if (LfgQueueInfo* qInfo = m_LfgQueue[guid])
delete qInfo;
delete m_LfgQueue[guid];
m_LfgQueue[guid] = pqInfo;
// ATM will only add it to the queue... No find group implementation... yet (on purpose)
}