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
@@ -122,15 +122,10 @@ namespace VMAP
// delete all internal data structures
void VMapFactory::clear()
{
if(iIgnoreSpellIds)
{
delete iIgnoreSpellIds;
iIgnoreSpellIds = NULL;
}
if(gVMapManager)
{
delete gVMapManager;
gVMapManager = NULL;
}
delete iIgnoreSpellIds;
iIgnoreSpellIds = NULL;
delete gVMapManager;
gVMapManager = NULL;
}
}