Skip to content

Commit 0bc64c1

Browse files
PostFXContext::Execute: handle camera attribs buffer map failure
1 parent 6ce3727 commit 0bc64c1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

PostProcess/Common/src/PostFXContext.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,11 @@ void PostFXContext::Execute(const RenderAttributes& RenderAttribs)
311311
m_Resources.Insert(RESOURCE_IDENTIFIER_CONSTANT_BUFFER, pBuffer);
312312
}
313313

314-
MapHelper<HLSL::CameraAttribs> CameraAttibs{RenderAttribs.pDeviceContext, m_Resources[RESOURCE_IDENTIFIER_CONSTANT_BUFFER], MAP_WRITE, MAP_FLAG_DISCARD};
315-
CameraAttibs[0] = *RenderAttribs.pCurrCamera;
316-
CameraAttibs[1] = *RenderAttribs.pPrevCamera;
314+
if (MapHelper<HLSL::CameraAttribs> CameraAttibs{RenderAttribs.pDeviceContext, m_Resources[RESOURCE_IDENTIFIER_CONSTANT_BUFFER], MAP_WRITE, MAP_FLAG_DISCARD})
315+
{
316+
CameraAttibs[0] = *RenderAttribs.pCurrCamera;
317+
CameraAttibs[1] = *RenderAttribs.pPrevCamera;
318+
}
317319
}
318320
else
319321
{

0 commit comments

Comments
 (0)