mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-09 01:29:23 +00:00
gl: Avoid null deref
This commit is contained in:
parent
4d75e98647
commit
75d0ff177d
2 changed files with 3 additions and 6 deletions
|
@ -473,14 +473,13 @@ void GLGSRender::end()
|
||||||
|
|
||||||
if (g_cfg.video.strict_rendering_mode)
|
if (g_cfg.video.strict_rendering_mode)
|
||||||
{
|
{
|
||||||
if (ds->old_contents != nullptr)
|
if (ds && ds->old_contents != nullptr)
|
||||||
copy_rtt_contents(ds);
|
copy_rtt_contents(ds);
|
||||||
|
|
||||||
for (auto &rtt : m_rtts.m_bound_render_targets)
|
for (auto &rtt : m_rtts.m_bound_render_targets)
|
||||||
{
|
{
|
||||||
if (std::get<0>(rtt) != 0)
|
if (auto surface = std::get<1>(rtt))
|
||||||
{
|
{
|
||||||
auto surface = std::get<1>(rtt);
|
|
||||||
if (surface->old_contents != nullptr)
|
if (surface->old_contents != nullptr)
|
||||||
copy_rtt_contents(surface);
|
copy_rtt_contents(surface);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1383,10 +1383,8 @@ void VKGSRender::end()
|
||||||
//Prepare surfaces if needed
|
//Prepare surfaces if needed
|
||||||
for (auto &rtt : m_rtts.m_bound_render_targets)
|
for (auto &rtt : m_rtts.m_bound_render_targets)
|
||||||
{
|
{
|
||||||
if (std::get<0>(rtt) != 0)
|
if (auto surface = std::get<1>(rtt))
|
||||||
{
|
{
|
||||||
auto surface = std::get<1>(rtt);
|
|
||||||
|
|
||||||
if (surface->old_contents != nullptr)
|
if (surface->old_contents != nullptr)
|
||||||
copy_rtt_contents(surface);
|
copy_rtt_contents(surface);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue