瀏覽代碼

解决退出登录崩溃

zwp 4 月之前
父節點
當前提交
e7e5a272b7
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      AIIM/AppDelegate.m

+ 3 - 0
AIIM/AppDelegate.m

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