From 5d237a98ae057da364e453e6b5be1c4f29210d5e Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Wed, 15 May 2024 19:24:33 +0200 Subject: [PATCH] wasm: fix writing debug info when some class was not found --- .../org/teavm/backend/wasm/generate/WasmClassGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/teavm/backend/wasm/generate/WasmClassGenerator.java b/core/src/main/java/org/teavm/backend/wasm/generate/WasmClassGenerator.java index e52732a53..58b2964f0 100644 --- a/core/src/main/java/org/teavm/backend/wasm/generate/WasmClassGenerator.java +++ b/core/src/main/java/org/teavm/backend/wasm/generate/WasmClassGenerator.java @@ -742,7 +742,7 @@ public class WasmClassGenerator { debug.instanceField("parent", 56, FieldType.OBJECT); debug.endClass(); } else if (isManagedClass(className)) { - var parent = data.cls.getParent() != null + var parent = data.cls != null && data.cls.getParent() != null ? indexes.get(ValueType.object(data.cls.getParent())) : -1; if (data.isInferface) {