]> source.dussan.org Git - gitblit.git/commitdiff
Fix potential NPE when excluding last change author
authorJames Moger <james.moger@gitblit.com>
Mon, 13 Oct 2014 23:16:51 +0000 (19:16 -0400)
committerJames Moger <james.moger@gitblit.com>
Mon, 13 Oct 2014 23:16:51 +0000 (19:16 -0400)
src/main/java/com/gitblit/tickets/TicketNotifier.java

index 07371b1b0591768941ca027c2957eb315e046459..d6217b358e2c8495d61ef26652fe88e1b26ad779 100644 (file)
@@ -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);
                }