From 07c6e38fa7c3581c58f660b434129af78bc4b7cf 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 10:07:16 +0000 Subject: [PATCH] bugfix(rendering): Handle null texture surface creation gracefully --- Core/Libraries/Source/WWVegas/WW3D2/render2dsentence.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Core/Libraries/Source/WWVegas/WW3D2/render2dsentence.cpp b/Core/Libraries/Source/WWVegas/WW3D2/render2dsentence.cpp index 16b80a36c2..cae5f20f98 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/render2dsentence.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/render2dsentence.cpp @@ -377,6 +377,11 @@ Render2DSentenceClass::Build_Textures () TextureClass *new_texture = W3DNEW TextureClass (desc.Width, desc.Width, WW3D_FORMAT_A4R4G4B4, MIP_LEVELS_1); SurfaceClass *texture_surface = new_texture->Get_Surface_Level (); + if (texture_surface == nullptr) { + REF_PTR_RELEASE (new_texture); + continue; + } + new_texture->Get_Filter().Set_U_Addr_Mode(TextureFilterClass::TEXTURE_ADDRESS_CLAMP); new_texture->Get_Filter().Set_V_Addr_Mode(TextureFilterClass::TEXTURE_ADDRESS_CLAMP); new_texture->Get_Filter().Set_Min_Filter(TextureFilterClass::FILTER_TYPE_NONE);