Skip to content

Commit

Permalink
[9674] Fix crash in ActivateSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
Laise committed Apr 5, 2010
1 parent 6a30f8d commit 45e7904
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/game/Player.cpp
Expand Up @@ -21565,9 +21565,11 @@ void Player::ActivateSpec(uint8 specNum)
// remove any talent rank if talent not listed in temp spec
if (iterTempSpec == tempSpec.end() || iterTempSpec->second.state == PLAYERSPELL_REMOVED)
{
TalentEntry const *talentInfo = talent.m_talentEntry;

This comment has been minimized.

Copy link
@Tasssadar

Tasssadar Apr 5, 2010

Something missing there? Null pointer check maybe...

This comment has been minimized.

Copy link
@VladimirMangos

VladimirMangos Apr 5, 2010

it can't be NULL by way how m_talentEntry filled.

for(int r = 0; r < MAX_TALENT_RANK; ++r)
if (talent.m_talentEntry->RankID[r])
removeSpell(talent.m_talentEntry->RankID[r],!IsPassiveSpell(talent.m_talentEntry->RankID[r]),false);
if (talentInfo->RankID[r])
removeSpell(talentInfo->RankID[r],!IsPassiveSpell(talentInfo->RankID[r]),false);

specIter = m_talents[m_activeSpec].begin();
}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9673"
#define REVISION_NR "9674"
#endif // __REVISION_NR_H__

0 comments on commit 45e7904

Please sign in to comment.