Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2461,6 +2461,10 @@ void BaseHeightMapRenderObjClass::renderShoreLines(CameraClass *pCamera)
if (DX8Wrapper::getBackBufferFormat() != WW3D_FORMAT_A8R8G8B8)
return; //can't apply effect on cards without destination alpha

// Safety check: ensure m_map is valid before dereferencing
if (!m_map)
return;

Int vertexCount = 0;
Int indexCount = 0;
Int drawEdgeY=m_map->getDrawOrgY()+m_map->getDrawHeight()-1;
Expand Down Expand Up @@ -2624,6 +2628,10 @@ void BaseHeightMapRenderObjClass::renderShoreLinesSorted(CameraClass *pCamera)
if (DX8Wrapper::getBackBufferFormat() != WW3D_FORMAT_A8R8G8B8)
return; //can't apply effect on cards without destination alpha

// Safety check: ensure m_map is valid before dereferencing
if (!m_map)
return;

Int vertexCount = 0;
Int indexCount = 0;
Int drawEdgeY=m_map->getDrawOrgY()+m_map->getDrawHeight()-1;
Expand Down
Loading