Skip to content
This repository was archived by the owner on Dec 6, 2025. It is now read-only.

Commit 95c1cf6

Browse files
lightningterrorSternXD
authored andcommitted
GS/HW: Check for null when source is either target or depth.
1 parent 97faea5 commit 95c1cf6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pcsx2/GS/Renderers/HW/GSRendererHW.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5213,7 +5213,7 @@ __ri void GSRendererHW::HandleTextureHazards(const GSTextureCache::Target* rt, c
52135213
{
52145214
// Detect framebuffer read that will need special handling
52155215
const GSTextureCache::Target* src_target = nullptr;
5216-
if (m_conf.tex == m_conf.rt)
5216+
if (rt && m_conf.tex == m_conf.rt)
52175217
{
52185218
// Can we read the framebuffer directly? (i.e. sample location matches up).
52195219
if (CanUseTexIsFB(rt, tex, tmm))
@@ -5233,7 +5233,7 @@ __ri void GSRendererHW::HandleTextureHazards(const GSTextureCache::Target* rt, c
52335233
GL_CACHE("Source is render target, taking copy.");
52345234
src_target = rt;
52355235
}
5236-
else if (m_conf.tex == m_conf.ds)
5236+
else if (ds && m_conf.tex == m_conf.ds)
52375237
{
52385238
// GL, Vulkan (in General layout), not DirectX!
52395239
const bool can_read_current_depth_buffer = g_gs_device->Features().test_and_sample_depth;

0 commit comments

Comments
 (0)