mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 21:32:52 +01:00
Core/Misc: Fix some static analysis issues
Add some asserts and additional NULL checks as sanity checks.
This commit is contained in:
@@ -370,6 +370,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint16 flags) const
|
||||
{
|
||||
if (flags & UPDATEFLAG_POSITION)
|
||||
{
|
||||
ASSERT(object);
|
||||
Transport* transport = object->GetTransport();
|
||||
|
||||
if (transport)
|
||||
@@ -459,6 +460,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint16 flags) const
|
||||
// 0x4
|
||||
if (flags & UPDATEFLAG_HAS_TARGET)
|
||||
{
|
||||
ASSERT(unit);
|
||||
if (Unit* victim = unit->GetVictim())
|
||||
data->append(victim->GetPackGUID());
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user