From 59441b1ff568c181afcf0cc3bdd854df21e1f885 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Tue, 9 Aug 2022 14:47:19 -0500 Subject: [PATCH] [dxgi] Also support use after free in IDXGISwapChain::SetFullscreenState() --- src/dxgi/dxgi_swapchain_dispatcher.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dxgi/dxgi_swapchain_dispatcher.h b/src/dxgi/dxgi_swapchain_dispatcher.h index 4ef50d04..c8a503b3 100644 --- a/src/dxgi/dxgi_swapchain_dispatcher.h +++ b/src/dxgi/dxgi_swapchain_dispatcher.h @@ -224,7 +224,9 @@ namespace dxvk { HRESULT STDMETHODCALLTYPE SetFullscreenState( BOOL Fullscreen, IDXGIOutput* pTarget) final { - return m_dispatch->SetFullscreenState(Fullscreen, pTarget); + if (likely(m_dispatch != nullptr)) + return m_dispatch->SetFullscreenState(Fullscreen, pTarget); + return S_OK; }