diff --git a/src/bootimage.cpp b/src/bootimage.cpp index 05f99c605e..605000d339 100644 --- a/src/bootimage.cpp +++ b/src/bootimage.cpp @@ -211,10 +211,12 @@ allFields(Thread* t, object typeMaps, object c, unsigned* count, object* array) includeMembers = false; *count += reinterpret_cast(&byteArrayBody(t, *array, 0)) ->fixedFieldCount; - } else if (classSuper(t, c)) { + } else { includeMembers = true; - fields = getNonStaticFields - (t, typeMaps, classSuper(t, c), fields, count, array); + if (classSuper(t, c)) { + fields = getNonStaticFields + (t, typeMaps, classSuper(t, c), fields, count, array); + } } if (classFieldTable(t, c)) {