diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index d33fa88c4..b4113eab0 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8449,11 +8449,11 @@ Unit* Unit::_GetTotem(uint8 slot) const Totem* Unit::GetTotem( uint8 slot ) const { - if(slot >= MAX_TOTEM) + if(slot >= MAX_TOTEM || !IsInWorld()) return NULL; Creature *totem = GetMap()->GetCreature(m_TotemSlot[slot]); - return totem->isTotem() ? (Totem*)totem : NULL; + return totem && totem->isTotem() ? (Totem*)totem : NULL; } void Unit::UnsummonAllTotems() diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index f1849783a..7d0db1903 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 "9190" + #define REVISION_NR "9191" #endif // __REVISION_NR_H__