From ceca4751b26b5da91cd8b2038a679be214d3b7db Mon Sep 17 00:00:00 2001 From: Mindy Pereira Date: Fri, 2 Dec 2011 10:30:13 -0800 Subject: [PATCH] Make sure to check for a null account before using the account. This is a common root cause with monkey crashes. Fixes b/5628984 com.google.android.email: java.lang.NullPointerException: Unable to start activity ComponentInfo{com.google.android.email/com.android.email.activity.setup.AccountSetupIncoming}: java.lang.NullPointerExceptionat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1955) Change-Id: Ib3ac5c62b72662402c7d5df4e5d895beaf324197 --- .../email/activity/setup/AccountSetupIncomingFragment.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/android/email/activity/setup/AccountSetupIncomingFragment.java b/src/com/android/email/activity/setup/AccountSetupIncomingFragment.java index 249e5b424..efd63e367 100644 --- a/src/com/android/email/activity/setup/AccountSetupIncomingFragment.java +++ b/src/com/android/email/activity/setup/AccountSetupIncomingFragment.java @@ -285,6 +285,9 @@ public class AccountSetupIncomingFragment extends AccountServerBaseFragment { private void configureEditor() { if (mConfigured) return; Account account = SetupData.getAccount(); + if (account == null) { + return; + } TextView lastView = mImapPathPrefixView; mBaseScheme = account.mHostAuthRecv.mProtocol; if (HostAuth.SCHEME_POP3.equals(mBaseScheme)) {