File tree Expand file tree Collapse file tree
GameEngineDevice/Source/W3DDevice/GameClient/Water
Libraries/Source/WWVegas/WW3D2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1338,6 +1338,13 @@ void WaterRenderObjClass::update()
13381338// -------------------------------------------------------------------------------------------------
13391339void WaterRenderObjClass::replaceSkyboxTexture (const AsciiString& oldTexName, const AsciiString& newTextName)
13401340{
1341+ // GeneralsX @bugfix Claude 05/07/2026 Guard against null m_skyBox: replaceAssetTexture dereferences the
1342+ // render object unconditionally, so skip texture replacement when the skybox asset never loaded.
1343+ if (m_skyBox == nullptr )
1344+ {
1345+ return ;
1346+ }
1347+
13411348 W3DAssetManager* assetManager = ((W3DAssetManager*)W3DAssetManager::Get_Instance ());
13421349
13431350 assetManager->replacePrototypeTexture (m_skyBox, oldTexName.str (), newTextName.str ());
@@ -1737,7 +1744,9 @@ void WaterRenderObjClass::Render(RenderInfoClass & rinfo)
17371744 break ;
17381745 }
17391746
1740- if (TheGlobalData && TheGlobalData->m_drawSkyBox )
1747+ // GeneralsX @bugfix Claude 05/07/2026 Guard against null m_skyBox: Create_Render_Obj("new_skybox") can fail
1748+ // when the skybox asset is unavailable (e.g. base Generals archives not found), causing a segfault here.
1749+ if (TheGlobalData && TheGlobalData->m_drawSkyBox && m_skyBox)
17411750 { // center skybox around camera
17421751 Vector3 pos=rinfo.Camera .Get_Position ();
17431752 pos.Z = TheGlobalData->m_skyBoxPositionZ ;
Original file line number Diff line number Diff line change @@ -1321,6 +1321,11 @@ void TextureLoadTaskClass::Apply_Missing_Texture()
13211321 return ;
13221322 }
13231323
1324+ #ifndef _WIN32
1325+ // DIAG: log which textures fall back to the magenta placeholder
1326+ fprintf (stderr, " [TEX_MISSING] '%s'\n " , static_cast <const char *>(Texture->Get_Full_Path ()));
1327+ #endif
1328+
13241329 D3DTexture = MissingTexture::_Get_Missing_Texture ();
13251330 if (D3DTexture == nullptr )
13261331 {
You can’t perform that action at this time.
0 commit comments