summaryrefslogtreecommitdiffstats
path: root/source/slang
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang')
-rw-r--r--source/slang/slang-compiler-tu.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/slang/slang-compiler-tu.cpp b/source/slang/slang-compiler-tu.cpp
index c20fc9a80..8bfe9a9ab 100644
--- a/source/slang/slang-compiler-tu.cpp
+++ b/source/slang/slang-compiler-tu.cpp
@@ -291,6 +291,7 @@ SLANG_NO_THROW SlangResult SLANG_MCALL ComponentType::getModuleDependency(
{
return SLANG_E_INVALID_ARG;
}
+ getModuleDependencies()[dependencyIndex]->addRef();
*outModule = getModuleDependencies()[dependencyIndex];
return SLANG_OK;
}