From fe0a01d82a634cac62a9392d9a8eeccc6a20e321 Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 2 Apr 2009 12:46:02 -0600 Subject: *Try to fix a crash. --HG-- branch : trunk --- src/game/Object.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/game/Object.cpp') diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 83a64262d24..c8fb721a224 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -793,7 +793,16 @@ bool Object::LoadValues(const char* data) void Object::_SetUpdateBits(UpdateMask *updateMask, Player* /*target*/) const { - for( uint16 index = 0; index < m_valuesCount; index ++ ) + if(!m_uint32Values_mirror || !m_uint32Values) + { + sLog.outCrash("Object entry %u (type %u) does not have uint32Values", GetEntry(), GetTypeId()); + return; + } + + assert(m_uint32Values[0]); + assert(m_uint32Values_mirror[0]); + + for(uint16 index = 0; index < m_valuesCount; ++index) { if(m_uint32Values_mirror[index]!= m_uint32Values[index]) updateMask->SetBit(index); -- cgit v1.2.3