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:
@@ -324,9 +324,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
|
||||
|
||||
if (result)
|
||||
{
|
||||
if (m_declinedname)
|
||||
delete m_declinedname;
|
||||
|
||||
delete m_declinedname;
|
||||
m_declinedname = new DeclinedName;
|
||||
Field *fields2 = result->Fetch();
|
||||
for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
|
||||
|
||||
Reference in New Issue
Block a user