Procházet zdrojové kódy

[Fix]ActivityUtil空栈异常

zhipeng před 2 roky
rodič
revize
feb0cc2376

+ 3 - 0
common/src/main/java/com/atmob/common/runtime/ActivityUtil.java

@@ -75,6 +75,9 @@ public class ActivityUtil {
     }
 
     public static Activity getTopActivity() {
+        if (getActivityCount() == 0) {
+            return null;
+        }
         return Holder.INSTANCE.activityStack.peek();
     }