Fix monkey NPE

Bug: 6276597
Change-Id: I6ee03a15e022583d1f03761c6b7b09dc41d49c17
diff --git a/src/com/android/mail/utils/Utils.java b/src/com/android/mail/utils/Utils.java
index a57b2f2..11d992f 100644
--- a/src/com/android/mail/utils/Utils.java
+++ b/src/com/android/mail/utils/Utils.java
@@ -703,12 +703,17 @@
      * Show the settings screen for the supplied account.
      */
      public static void showFolderSettings(Context context, Account account, Folder folder) {
-        final Intent settingsIntent = new Intent(Intent.ACTION_EDIT, account.settingsIntentUri);
+         if (account == null || folder == null) {
+             LogUtils.e(LOG_TAG, "Invalid attempt to show folder settings. account: %s folder: %s",
+                     account, folder);
+             return;
+         }
+         final Intent settingsIntent = new Intent(Intent.ACTION_EDIT, account.settingsIntentUri);
 
-        settingsIntent.putExtra(EditSettingsExtras.EXTRA_ACCOUNT, account);
-        settingsIntent.putExtra(EditSettingsExtras.EXTRA_FOLDER, folder);
+         settingsIntent.putExtra(EditSettingsExtras.EXTRA_ACCOUNT, account);
+         settingsIntent.putExtra(EditSettingsExtras.EXTRA_FOLDER, folder);
 
-        context.startActivity(settingsIntent);
+         context.startActivity(settingsIntent);
     }
 
     /**