From 55b8d062bffb0bc92562b525966a2e22bbff4af7 Mon Sep 17 00:00:00 2001 From: Martin Ndegwa Date: Wed, 23 Sep 2020 18:57:11 +0300 Subject: [PATCH] Add check for null login presenter --- .../smartregister/login/interactor/BaseLoginInteractor.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opensrp-app/src/main/java/org/smartregister/login/interactor/BaseLoginInteractor.java b/opensrp-app/src/main/java/org/smartregister/login/interactor/BaseLoginInteractor.java index f6e354035..ec3a5374f 100644 --- a/opensrp-app/src/main/java/org/smartregister/login/interactor/BaseLoginInteractor.java +++ b/opensrp-app/src/main/java/org/smartregister/login/interactor/BaseLoginInteractor.java @@ -109,7 +109,10 @@ private void localLogin(WeakReference view, String userN private void navigateToHomePage(String userName) { getUserService().localLoginWith(userName); - getLoginView().goToHome(false); + + if (mLoginPresenter != null) { + getLoginView().goToHome(false); + } CoreLibrary.getInstance().initP2pLibrary(userName);