summaryrefslogtreecommitdiffstats
path: root/source/slang/slang.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang.cpp')
-rw-r--r--source/slang/slang.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index 4d83823d2..c6af8b34d 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -1266,6 +1266,9 @@ SLANG_NO_THROW SlangResult SLANG_MCALL Linkage::createCompositeComponentType(
slang::IComponentType** outCompositeComponentType,
ISlangBlob** outDiagnostics)
{
+ if (outCompositeComponentType == nullptr)
+ return SLANG_E_INVALID_ARG;
+
SLANG_AST_BUILDER_RAII(getASTBuilder());
// Attempting to create a "composite" of just one component type should
@@ -1491,6 +1494,9 @@ SLANG_NO_THROW SlangResult SLANG_MCALL Linkage::createTypeConformanceComponentTy
SlangInt conformanceIdOverride,
ISlangBlob** outDiagnostics)
{
+ if (outConformanceComponentType == nullptr)
+ return SLANG_E_INVALID_ARG;
+
SLANG_AST_BUILDER_RAII(getASTBuilder());
RefPtr<TypeConformance> result;