[12729] Fixed possible crash in LookupSpell command

This commit is contained in:
sanctum32 2013-11-17 22:26:16 +02:00 committed by Antz
parent 75a4184ef5
commit 98cc1342be
2 changed files with 5 additions and 3 deletions

View file

@ -3468,7 +3468,7 @@ bool ChatHandler::HandleLookupSpellCommand(char* args)
uint32 counter = 0; // Counter for figure out that we found smth.
// Search in Spell.dbc
for (uint32 id = 0; id < sSpellStore.GetNumRows(); ++id)
for (uint32 id = 0; id < sSpellStore.GetNumRows(); id++)
{
SpellEntry const* spellInfo = sSpellStore.LookupEntry(id);
if (spellInfo)
@ -3498,7 +3498,9 @@ bool ChatHandler::HandleLookupSpellCommand(char* args)
if (loc < MAX_LOCALE)
{
ShowSpellListHelper(target, spellInfo, LocaleConstant(loc));
if (target)
ShowSpellListHelper(target, spellInfo, LocaleConstant(loc));
++counter;
}
}

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12728"
#define REVISION_NR "12729"
#endif // __REVISION_NR_H__