diff options
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index b77a3efc8..b3ac7f73d 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -5040,13 +5040,21 @@ IArtifact* ComponentType::getTargetArtifact(Int targetIndex, slang::IBlob** outD }); List<RefPtr<ComponentType>> components; components.add(this); + bool entryPointsDiscovered = false; for (auto module : modules) { for (auto entryPoint : module->getEntryPoints()) { components.add(entryPoint); + entryPointsDiscovered = true; } } + // If no entry points were discovered, then we should return nullptr. + if (!entryPointsDiscovered) + { + return nullptr; + } + RefPtr<CompositeComponentType> composite = new CompositeComponentType(linkage, components); ComPtr<IComponentType> linkedComponentType; SLANG_RETURN_NULL_ON_FAIL(composite->link(linkedComponentType.writeRef(), outDiagnostics)); |
