From 70250d8ff53081eaccac24517ea96b89d27507b9 Mon Sep 17 00:00:00 2001 From: James Moger Date: Mon, 13 Oct 2014 19:16:51 -0400 Subject: [PATCH] Fix potential NPE when excluding last change author --- src/main/java/com/gitblit/tickets/TicketNotifier.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gitblit/tickets/TicketNotifier.java b/src/main/java/com/gitblit/tickets/TicketNotifier.java index 07371b1b..d6217b35 100644 --- a/src/main/java/com/gitblit/tickets/TicketNotifier.java +++ b/src/main/java/com/gitblit/tickets/TicketNotifier.java @@ -596,7 +596,7 @@ public class TicketNotifier { // respect the author's email preference UserModel lastAuthor = userManager.getUserModel(lastChange.author); - if (!lastAuthor.getPreferences().isEmailMeOnMyTicketChanges()) { + if (lastAuthor != null && !lastAuthor.getPreferences().isEmailMeOnMyTicketChanges()) { toAddresses.remove(lastAuthor.emailAddress); ccAddresses.remove(lastAuthor.emailAddress); } -- 2.39.5