summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-reflection-api.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/slang-reflection-api.cpp b/source/slang/slang-reflection-api.cpp
index eb1514f4c..e68efde06 100644
--- a/source/slang/slang-reflection-api.cpp
+++ b/source/slang/slang-reflection-api.cpp
@@ -1397,7 +1397,7 @@ namespace Slang
TypeLayout::ExtendedInfo::SubObjectRangeInfo subObjectRange;
subObjectRange.bindingRangeIndex = bindingRangeIndex;
subObjectRange.spaceOffset = 0;
- if (kind == LayoutResourceKind::RegisterSpace)
+ if (kind == LayoutResourceKind::RegisterSpace && path)
{
auto resInfo = path->var->FindResourceInfo(LayoutResourceKind::RegisterSpace);
subObjectRange.spaceOffset = resInfo->index;