Fix bug in WASM backend
@@ -283,6 +283,7 @@ public class WasmClassGenerator {
ClassReader cls = processedClassSource.get(name);
+ if (cls != null) {
if (cls.getSimpleName() != null) {
header.setAddress(CLASS_SIMPLE_NAME, stringPool.getStringPointer(cls.getSimpleName()));
}
@@ -291,7 +292,9 @@ public class WasmClassGenerator {
header.setAddress(CLASS_ENCLOSING_CLASS, getClassPointer(ValueType.object(cls.getOwnerName())));
}
if (cls.getDeclaringClassName() != null && processedClassSource.get(cls.getDeclaringClassName()) != null) {
- header.setAddress(CLASS_DECLARING_CLASS, getClassPointer(ValueType.object(cls.getDeclaringClassName())));
+ header.setAddress(CLASS_DECLARING_CLASS,
+ getClassPointer(ValueType.object(cls.getDeclaringClassName())));
+ }
}
if (vtable != null) {
