Skip to content

Commit 393d2db

Browse files
DoHuberGSOberon Swings
authored andcommitted
Add null check for classNode.anns to avoid possible NPE
1 parent 36673d7 commit 393d2db

File tree

1 file changed

+1
-1
lines changed
  • android/src/main/java/proguard/dexfile/converter

1 file changed

+1
-1
lines changed

android/src/main/java/proguard/dexfile/converter/Dex2Pro.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ private void convertClass(int dexVersion, DexClassNode classNode, ClassVisitor c
530530
if (clzInfo != null) {
531531
// isInnerClass = clzInfo.enclosingClass != null || clzInfo.enclosingMethod != null;
532532
if (clzInfo.enclosingClass != null || clzInfo.enclosingMethod != null) {
533-
if (classNode.anns.stream().noneMatch(x ->
533+
if (classNode.anns != null && classNode.anns.stream().noneMatch(x ->
534534
x.type.equals("Ldalvik/annotation/EnclosingMethod;"))) {
535535
isInnerClass = true;
536536
} else if (clzInfo.enclosingClass != null) {

0 commit comments

Comments
 (0)