summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-09-08 18:47:04 -0700
committerGitHub <noreply@github.com>2021-09-08 18:47:04 -0700
commitebb29e6c830cafe74ca64da416ded01fc59d208a (patch)
treecb18b800b6456e07f8b44d2bbd87dd512439a9e9 /source
parent0a81d11bc06e55089f7061225b9553329f697828 (diff)
Fix return code bug in createTypeConformance (#1930)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index e62d2c9ae..b6359146c 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -1066,8 +1066,9 @@ SLANG_NO_THROW SlangResult SLANG_MCALL Linkage::createTypeConformanceComponentTy
catch (...)
{}
sink.getBlobIfNeeded(outDiagnostics);
+ bool success = (result != nullptr);
*outConformanceComponentType = result.detach();
- return result ? SLANG_OK : SLANG_FAIL;
+ return success ? SLANG_OK : SLANG_FAIL;
}
SLANG_NO_THROW SlangResult SLANG_MCALL Linkage::createCompileRequest(