diff options
| author | Yong He <yonghe@outlook.com> | 2021-09-08 18:47:04 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-08 18:47:04 -0700 |
| commit | ebb29e6c830cafe74ca64da416ded01fc59d208a (patch) | |
| tree | cb18b800b6456e07f8b44d2bbd87dd512439a9e9 /source/slang/slang.cpp | |
| parent | 0a81d11bc06e55089f7061225b9553329f697828 (diff) | |
Fix return code bug in createTypeConformance (#1930)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 3 |
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( |
