summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-reflection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-reflection.cpp')
-rw-r--r--source/slang/slang-reflection.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/slang/slang-reflection.cpp b/source/slang/slang-reflection.cpp
index f2c4973ed..59130b0fc 100644
--- a/source/slang/slang-reflection.cpp
+++ b/source/slang/slang-reflection.cpp
@@ -1210,9 +1210,7 @@ SLANG_API char const* spReflectionEntryPoint_getName(
SlangReflectionEntryPoint* inEntryPoint)
{
auto entryPointLayout = convert(inEntryPoint);
- if(!entryPointLayout) return 0;
-
- return getText(entryPointLayout->entryPoint.GetName()).begin();
+ return entryPointLayout ? getCstr(entryPointLayout->name) : nullptr;
}
SLANG_API unsigned spReflectionEntryPoint_getParameterCount(