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,12 +219,12 @@ public abstract class BottomNavigationController extends BaseController {
* BottomNavigationController#getControllerFor(int)}, using a {@link FadeChangeHandler}. * BottomNavigationController#getControllerFor(int)}, using a {@link FadeChangeHandler}.
*/ */
protected void resetCurrentBackstack() { protected void resetCurrentBackstack() {
lastActiveChildRouter if (lastActiveChildRouter != null) {
.setRoot( lastActiveChildRouter.setRoot(RouterTransaction.with(this.getControllerFor(currentlySelectedItemId))
RouterTransaction.with(this.getControllerFor(currentlySelectedItemId))
.pushChangeHandler(new FadeChangeHandler()) .pushChangeHandler(new FadeChangeHandler())
.popChangeHandler(new FadeChangeHandler())); .popChangeHandler(new FadeChangeHandler()));
} }
}
/** /**
* Navigate to the supplied {@link Controller}, while setting the menuItemId as selected on the * Navigate to the supplied {@link Controller}, while setting the menuItemId as selected on the