Parcourir la source

解决退出登录崩溃

zwp il y a 4 mois
Parent
commit
e7e5a272b7
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      AIIM/AppDelegate.m

+ 3 - 0
AIIM/AppDelegate.m

@@ -394,6 +394,9 @@
 
 - (void)updateTabBarBadgeValueAtIndex:(NSInteger)index badgeCount:(NSInteger)badgeCount {
     UITabBarController * tabbarVc = (UITabBarController *)self.window.rootViewController;
+    if (![tabbarVc isKindOfClass:[UITabBarController class]]) {
+        return;
+    }
     if(index < 0 || index >= tabbarVc.tabBar.items.count){
         return;
     }