Skip to content

Commit 53095f7

Browse files
committed
[firebase_admob]Destroy adView Before contentView Checking
1 parent 6b6c640 commit 53095f7

File tree

1 file changed

+2
-2
lines changed
  • packages/firebase_admob/android/src/main/java/io/flutter/plugins/firebaseadmob

1 file changed

+2
-2
lines changed

packages/firebase_admob/android/src/main/java/io/flutter/plugins/firebaseadmob/MobileAd.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,11 @@ void show() {
177177
void dispose() {
178178
super.dispose();
179179

180+
adView.destroy();
181+
180182
View contentView = activity.findViewById(id);
181183
if (contentView == null || !(contentView.getParent() instanceof ViewGroup)) return;
182184

183-
adView.destroy();
184-
185185
ViewGroup contentParent = (ViewGroup) (contentView.getParent());
186186
contentParent.removeView(contentView);
187187
}

0 commit comments

Comments
 (0)