Selaa lähdekoodia

Fix a null crash on back

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic 7 vuotta sitten
vanhempi
commit
9669a36f0b

+ 5 - 1
app/src/main/java/com/nextcloud/talk/controllers/base/bottomnavigation/BottomNavigationController.java

@@ -347,7 +347,11 @@ public abstract class BottomNavigationController extends BaseController {
      * The childRouter should handleBack,
      * as this BottomNavigationController doesn't have a back step sensible to the user.
      */
-        return lastActiveChildRouter.handleBack();
+        if (lastActiveChildRouter != null) {
+            return lastActiveChildRouter.handleBack();
+        } else {
+            return false;
+        }
     }
 
     /**