From 9ba63412d3596d33b5df3500c86b2b1c78a1c9b3 Mon Sep 17 00:00:00 2001 From: "seer-by-sentry[bot]" <157164994+seer-by-sentry[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 09:58:10 +0000 Subject: [PATCH] bugfix(drawable): Prevent crash when rider tint envelope is null --- .../GameClient/Drawable/Draw/W3DOverlordTankDraw.cpp | 4 +++- .../GameClient/Drawable/Draw/W3DOverlordTruckDraw.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Core/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DOverlordTankDraw.cpp b/Core/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DOverlordTankDraw.cpp index 906000d1db5..cff9e12392c 100644 --- a/Core/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DOverlordTankDraw.cpp +++ b/Core/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DOverlordTankDraw.cpp @@ -86,7 +86,9 @@ void W3DOverlordTankDraw::doDrawModule(const Matrix3D* transformMtx) ) { Drawable *riderDraw = me->getContain()->friend_getRider()->getDrawable(); - riderDraw->setColorTintEnvelope( *getDrawable()->getColorTintEnvelope() ); + TintEnvelope *env = getDrawable()->getColorTintEnvelope(); + if ( env ) + riderDraw->setColorTintEnvelope( *env ); riderDraw->notifyDrawableDependencyCleared(); riderDraw->draw( );// What the hell? This param isn't used for anything diff --git a/Core/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DOverlordTruckDraw.cpp b/Core/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DOverlordTruckDraw.cpp index 1355ff37ff6..75ea994f9d9 100644 --- a/Core/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DOverlordTruckDraw.cpp +++ b/Core/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DOverlordTruckDraw.cpp @@ -86,7 +86,9 @@ void W3DOverlordTruckDraw::doDrawModule(const Matrix3D* transformMtx) ) { Drawable *riderDraw = me->getContain()->friend_getRider()->getDrawable(); - riderDraw->setColorTintEnvelope( *getDrawable()->getColorTintEnvelope() ); + TintEnvelope *env = getDrawable()->getColorTintEnvelope(); + if ( env ) + riderDraw->setColorTintEnvelope( *env ); riderDraw->notifyDrawableDependencyCleared(); riderDraw->draw();