From 5e10f1b4f0654515af1fcb29e8d1f35e691c8aa3 Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Thu, 3 Sep 2020 23:00:53 -0700 Subject: Fix a crashing issue for non-end-to-end compilation (#1532) The refactorings that added support for multiple entry points in an output file seemingly introduced a regression such that we crash on compilation that is not "end-to-end." Unfortunately, all of our testing only covers end-to-end compilation, and many users only use that mode. I've added a fix for the issue I ran into, but I haven't addressed the testing gap in this change. Without adding testing for non-end-to-end compilation, I expect further regressions to slip in over time. Co-authored-by: Yong He --- source/slang/slang-compiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp index 9b567a7d7..859da5d11 100755 --- a/source/slang/slang-compiler.cpp +++ b/source/slang/slang-compiler.cpp @@ -1226,7 +1226,7 @@ SlangResult dissassembleDXILUsingDXC( CodeGenTarget sourceTarget = CodeGenTarget::None; SourceLanguage sourceLanguage = SourceLanguage::Unknown; - PassThroughMode downstreamCompiler = endToEndReq->passThrough; + PassThroughMode downstreamCompiler = endToEndReq ? endToEndReq->passThrough : PassThroughMode::None; // If we are not in pass through, lookup the default compiler for the emitted source type if (downstreamCompiler == PassThroughMode::None) -- cgit v1.2.3