From cf7b3c84ce97ff4578db0a84a28fc3149cd678d1 Mon Sep 17 00:00:00 2001 From: Logan Date: Mon, 19 Oct 2020 09:10:01 -0600 Subject: [PATCH] Protect against addressing nullptr --- src/gDP.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gDP.cpp b/src/gDP.cpp index c8b90896..9bc914a9 100644 --- a/src/gDP.cpp +++ b/src/gDP.cpp @@ -896,7 +896,8 @@ void gDPFullSync() frameBufferList().updateCurrentBufferEndAddress(); FrameBuffer * pCurrentBuffer = frameBufferList().getCurrent(); - pCurrentBuffer->copyDepthTexture(); + if (pCurrentBuffer != nullptr) + pCurrentBuffer->copyDepthTexture(); if ((config.frameBufferEmulation.copyToRDRAM != Config::ctDisable || (config.generalEmulation.hacks & hack_subscreen) != 0) && !FBInfo::fbInfo.isSupported() && pCurrentBuffer != nullptr &&