From 258adee0903df3da9e940a356bbb76577bc6f3b1 Mon Sep 17 00:00:00 2001 From: "seer-by-sentry[bot]" <157164994+seer-by-sentry[bot]@users.noreply.github.com> Date: Sat, 8 Aug 2026 11:04:45 +0000 Subject: [PATCH] fix(w3ddevice): Add null check for tree tile RGB data in W3DTreeBuffer::drawTrees --- .../Source/W3DDevice/GameClient/W3DTreeBuffer.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DTreeBuffer.cpp b/Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DTreeBuffer.cpp index 4ef538ab3eb..def7538d4bf 100644 --- a/Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DTreeBuffer.cpp +++ b/Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DTreeBuffer.cpp @@ -169,7 +169,9 @@ int W3DTreeBuffer::W3DTreeTextureClass::update(W3DTreeBuffer* buffer) } Int i, j; for (j = 0; j < tilePixelExtent; j++) { - UnsignedByte* pBGR = pTile->getRGBDataForWidth(tilePixelExtent); + UnsignedByte* pTileRGB = pTile->getRGBDataForWidth(tilePixelExtent); + if (!pTileRGB) continue; + UnsignedByte* pBGR = pTileRGB; pBGR += (tilePixelExtent - (1 + j)) * TILE_BYTES_PER_PIXEL * tilePixelExtent; // invert to match. Int row = position.y + j; UnsignedByte* pBGRA = ((UnsignedByte*)locked_rect.pBits) + @@ -1989,4 +1991,8 @@ void W3DTreeBuffer::loadPostProcess() + + + +