summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/interface/MapHelper.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/Graphics/GraphicsEngine/interface/MapHelper.h b/Graphics/GraphicsEngine/interface/MapHelper.h
index 4032952f..5134a0d1 100644
--- a/Graphics/GraphicsEngine/interface/MapHelper.h
+++ b/Graphics/GraphicsEngine/interface/MapHelper.h
@@ -114,12 +114,14 @@ public:
auto &BuffDesc = pBuffer->GetDesc();
VERIFY(sizeof(DataType) <= BuffDesc.uiSizeInBytes, "Data type size exceeds buffer size");
#endif
- m_pContext = pContext;
- m_pBuffer = pBuffer;
- m_MapType = MapType;
- m_MapFlags = MapFlags;
- m_pBuffer->Map(m_pContext, MapType, MapFlags, (PVoid&)m_pMappedData);
- VERIFY( m_pMappedData, "Map failed" );
+ pBuffer->Map(pContext, MapType, MapFlags, (PVoid&)m_pMappedData);
+ if(m_pMappedData != nullptr)
+ {
+ m_pContext = pContext;
+ m_pBuffer = pBuffer;
+ m_MapType = MapType;
+ m_MapFlags = MapFlags;
+ }
}
/// Unamps the resource and resets the object state to default.