From a22f2e11445ae8fba0b948e1f369c192b3963b3f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 15 Feb 2016 21:15:43 -0500 Subject: [PATCH] D3DBase: Fix missing return statement --- Source/Core/VideoBackends/D3D12/D3DBase.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Core/VideoBackends/D3D12/D3DBase.h b/Source/Core/VideoBackends/D3D12/D3DBase.h index b3ae9555a1..f8a61ad793 100644 --- a/Source/Core/VideoBackends/D3D12/D3DBase.h +++ b/Source/Core/VideoBackends/D3D12/D3DBase.h @@ -129,6 +129,7 @@ static void SetDebugObjectName12(ID3D12Resource* resource, LPCSTR name) static std::string GetDebugObjectName12(ID3D12Resource* resource) { std::string name; + if (resource) { UINT size = 0; @@ -136,6 +137,8 @@ static std::string GetDebugObjectName12(ID3D12Resource* resource) name.resize(size); resource->GetPrivateData(WKPDID_D3DDebugObjectName, &size, const_cast(name.data())); } + + return name; } } // namespace D3D