diff options
Diffstat (limited to 'source/slang/slang-emit-cpp.cpp')
| -rw-r--r-- | source/slang/slang-emit-cpp.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index b0d1fbb4c..13a85e8ab 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -614,7 +614,10 @@ void CPPSourceEmitter::emitGlobalRTTISymbolPrefix() void CPPSourceEmitter::emitWitnessTable(IRWitnessTable* witnessTable) { - auto interfaceType = cast<IRInterfaceType>(witnessTable->getConformanceType()); + auto interfaceType = as<IRInterfaceType>(witnessTable->getConformanceType()); + + if (!interfaceType) + return; // Ignore witness tables for builtin interface types. if (isBuiltin(interfaceType)) |
