Wasm: fix compiler crash when compiling without debug info

This commit is contained in:
Alexey Andreev 2022-11-30 14:01:46 +01:00
parent 4453bba33b
commit 930a57fdd6

View File

@ -553,7 +553,7 @@ public class WasmTarget implements TeaVMTarget, TeaVMWasmHost {
var writer = new WasmBinaryWriter();
var debugBuilder = debugging ? new DebugInfoBuilder() : null;
var renderer = new WasmBinaryRenderer(writer, version, obfuscated, dwarfGenerator, dwarfClassGen,
debugBuilder.lines());
debugBuilder != null ? debugBuilder.lines() : null);
renderer.render(module, buildDebug(dwarfGenerator, dwarfClassGen, debugBuilder));
try (OutputStream output = buildTarget.createResource(outputName)) {