Merge "Add autoAssignField to docs"
diff --git a/owners-autoassign/src/main/java/com/googlesource/gerrit/owners/common/SyncReviewerManager.java b/owners-autoassign/src/main/java/com/googlesource/gerrit/owners/common/SyncReviewerManager.java
index 83ba531..efd5a37 100644
--- a/owners-autoassign/src/main/java/com/googlesource/gerrit/owners/common/SyncReviewerManager.java
+++ b/owners-autoassign/src/main/java/com/googlesource/gerrit/owners/common/SyncReviewerManager.java
@@ -137,13 +137,15 @@
         }
 
         in.ignoreAutomaticAttentionSetRules = true;
-        in.addToAttentionSet =
-            ownersForAttentionSet.get().addToAttentionSet(changeInfo, reviewersAccounts).stream()
-                .map(
-                    (reviewer) ->
-                        new AttentionSetInput(
-                            reviewer.toString(), "Selected as member of the OWNERS file"))
-                .collect(Collectors.toList());
+        if (ownersForAttentionSet != null) {
+          in.addToAttentionSet =
+              ownersForAttentionSet.get().addToAttentionSet(changeInfo, reviewersAccounts).stream()
+                  .map(
+                      (reviewer) ->
+                          new AttentionSetInput(
+                              reviewer.toString(), "Selected as member of the OWNERS file"))
+                  .collect(Collectors.toList());
+        }
 
         gApi.changes().id(changeInfo.id).current().review(in);
       }