Check for null

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2017-12-29 00:23:12 +01:00
parent d24c96e573
commit bf71a90b8c

View file

@ -219,11 +219,11 @@ public abstract class BottomNavigationController extends BaseController {
* BottomNavigationController#getControllerFor(int)}, using a {@link FadeChangeHandler}.
*/
protected void resetCurrentBackstack() {
lastActiveChildRouter
.setRoot(
RouterTransaction.with(this.getControllerFor(currentlySelectedItemId))
.pushChangeHandler(new FadeChangeHandler())
.popChangeHandler(new FadeChangeHandler()));
if (lastActiveChildRouter != null) {
lastActiveChildRouter.setRoot(RouterTransaction.with(this.getControllerFor(currentlySelectedItemId))
.pushChangeHandler(new FadeChangeHandler())
.popChangeHandler(new FadeChangeHandler()));
}
}
/**