From bb8c8294e5108cb7403c88ca12b9f0041631444b Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 22 Oct 2019 20:34:20 +0100 Subject: [PATCH] Ensure we always create a reflection object, even if it's empty * Fixes crashes with DXBC objects that only contain input/output signatures --- renderdoc/driver/shaders/dxbc/dxbc_container.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/renderdoc/driver/shaders/dxbc/dxbc_container.cpp b/renderdoc/driver/shaders/dxbc/dxbc_container.cpp index 52712393d..b2eda1270 100644 --- a/renderdoc/driver/shaders/dxbc/dxbc_container.cpp +++ b/renderdoc/driver/shaders/dxbc/dxbc_container.cpp @@ -994,6 +994,8 @@ DXBCContainer::DXBCContainer(const void *ByteCode, size_t ByteCodeLength) m_Reflection = m_DXBCByteCode->GuessReflection(); else if(m_DXILByteCode) m_Reflection = m_DXILByteCode->GetReflection(); + else + m_Reflection = new Reflection; } for(uint32_t chunkIdx = 0; chunkIdx < header->numChunks; chunkIdx++)