From ea04ad12110df6b958c117f5d92f45813316cd70 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 11 Nov 2024 19:29:18 -0800 Subject: Add wasm binding to get reflection json. (#5536) Co-authored-by: Ellie Hermaszewska --- source/slang/slang-reflection-json.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/slang/slang-reflection-json.cpp') diff --git a/source/slang/slang-reflection-json.cpp b/source/slang/slang-reflection-json.cpp index c7d11a6c3..6c00c8f07 100644 --- a/source/slang/slang-reflection-json.cpp +++ b/source/slang/slang-reflection-json.cpp @@ -1071,7 +1071,7 @@ static void emitReflectionEntryPointJSON( } // If code generation has been performed, print out the parameter usage by this entry point. - if ((request->getCompileFlags() & SLANG_COMPILE_FLAG_NO_CODEGEN) == 0) + if (request && (request->getCompileFlags() & SLANG_COMPILE_FLAG_NO_CODEGEN) == 0) { writer << ",\n\"bindings\": [\n"; writer.indent(); -- cgit v1.2.3