mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[12729] Fixed possible crash in LookupSpell command
This commit is contained in:
parent
75a4184ef5
commit
98cc1342be
2 changed files with 5 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12728"
|
||||
#define REVISION_NR "12729"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue