Fix NullPointerException in ZenModeHelper

Bug: 116520986
Test: Flashed to my personal device
Change-Id: I35123e55f5b7e59b0c1685521eff4762a5e765f4
(cherry picked from commit 24bdf229a5e1836cee97489405adcf03d1470028)
diff --git a/services/core/java/com/android/server/notification/ZenModeHelper.java b/services/core/java/com/android/server/notification/ZenModeHelper.java
index 9bf21c8..760f155 100644
--- a/services/core/java/com/android/server/notification/ZenModeHelper.java
+++ b/services/core/java/com/android/server/notification/ZenModeHelper.java
@@ -430,7 +430,7 @@
         for (ZenRule defaultRule : mDefaultConfig.automaticRules.values()) {
             ZenRule currRule = mConfig.automaticRules.get(defaultRule.id);
             // if default rule wasn't modified, use localized name instead of previous
-            if (!currRule.modified && !defaultRule.name.equals(currRule.name)) {
+            if (currRule != null && !currRule.modified && !defaultRule.name.equals(currRule.name)) {
                 if (canManageAutomaticZenRule(defaultRule)) {
                     if (DEBUG) Slog.d(TAG, "Locale change - updating default zen rule name "
                             + "from " + currRule.name + " to " + defaultRule.name);