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) {