diff options
| author | megamage <none@none> | 2009-04-02 12:46:02 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-04-02 12:46:02 -0600 |
| commit | fe0a01d82a634cac62a9392d9a8eeccc6a20e321 (patch) | |
| tree | 7153ae759fcdd964750a37e75ecce115e48f6a40 /src | |
| parent | 09757c1d59ef111ffc814eabc223dd60e8cae7c1 (diff) | |
*Try to fix a crash.
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/Object.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
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); |
