GPU/HW: Fix possible crash (again)

This commit is contained in:
Stenzek 2024-02-03 16:00:24 +10:00
parent cdea4eb68b
commit cdb614a51f
No known key found for this signature in database

View file

@ -413,10 +413,15 @@ void GPU_HW::UpdateSettings(const Settings& old_settings)
{
m_pgxp_depth_buffer = g_settings.UsingPGXPDepthBuffer();
m_batch.use_depth_buffer = false;
if (m_pgxp_depth_buffer)
ClearDepthBuffer();
else if (m_vram_texture) // might be null when resizing
UpdateDepthBufferFromMaskBit();
// might be null when resizing
if (m_vram_texture)
{
if (m_pgxp_depth_buffer)
ClearDepthBuffer();
else
UpdateDepthBufferFromMaskBit();
}
}
UpdateSoftwareRenderer(true);