diff options
author | Shauren <shauren.trinity@gmail.com> | 2017-06-16 20:08:29 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2017-06-16 20:08:29 +0200 |
commit | 777d839a5fda0d09c9f5340ac0942187f10e211e (patch) | |
tree | e69f1fdf4d82328e68a2362e1d257474ab99d21c /src | |
parent | 00df865abb49f2ceb64b2537d5c085023cbb63f0 (diff) |
Core/Objects: Fixed crash added in 410bc499768ce2b5d1e5247815efebd0ba9b65a3
Closes #19899
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Object/Object.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 8a722de45dc..a2f9654fa5f 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -355,10 +355,16 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const bool SmoothPhasing = false; bool SceneObjCreate = false; bool PlayerCreateData = false; + std::vector<uint32> const* PauseTimes = nullptr; uint32 PauseTimesCount = 0; if (GameObject const* go = ToGameObject()) + { if (go->GetGoType() == GAMEOBJECT_TYPE_TRANSPORT) - PauseTimesCount = go->GetGOValue()->Transport.StopFrames->size(); + { + PauseTimes = go->GetGOValue()->Transport.StopFrames; + PauseTimesCount = PauseTimes->size(); + } + } data->WriteBit(NoBirthAnim); data->WriteBit(EnablePortals); @@ -502,8 +508,8 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const if (Rotation) *data << uint64(ToGameObject()->GetPackedWorldRotation()); // Rotation - if (GameObject const* go = ToGameObject()) - data->append(go->GetGOValue()->Transport.StopFrames->data(), PauseTimesCount); + if (PauseTimes) + data->append(PauseTimes->data(), PauseTimes->size()); if (HasMovementTransport) { |