From c38c876b1d018c2d3dfa3bbbb61bfd7c6239da71 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Tue, 14 Dec 2010 13:26:06 +0300 Subject: [PATCH] [10873] Fixed crash for case when trainer have only data in npc_trainer_template. Good know base at report that this feature so quick start used actively ;) --- src/game/NPCHandler.cpp | 2 +- src/shared/revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/NPCHandler.cpp b/src/game/NPCHandler.cpp index e1c5092fa..53f6b1e90 100644 --- a/src/game/NPCHandler.cpp +++ b/src/game/NPCHandler.cpp @@ -168,7 +168,7 @@ void WorldSession::SendTrainerList(ObjectGuid guid, const std::string& strTitle) WorldPacket data( SMSG_TRAINER_LIST, 8+4+4+maxcount*38 + strTitle.size()+1); data << ObjectGuid(guid); - data << uint32(cSpells->trainerType ? cSpells->trainerType : tSpells->trainerType); + data << uint32(cSpells && cSpells->trainerType ? cSpells->trainerType : tSpells->trainerType); size_t count_pos = data.wpos(); data << uint32(maxcount); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index a893178aa..4801a51c7 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10872" + #define REVISION_NR "10873" #endif // __REVISION_NR_H__