From bd9f4ef971805ef8ef221b865c31c2f7c1f98a1d Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 4 Jul 2024 01:11:26 +0100 Subject: [PATCH] fix non null --- .../java/cc/fascinated/bat/service/DiscordMessageService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/cc/fascinated/bat/service/DiscordMessageService.java b/src/main/java/cc/fascinated/bat/service/DiscordMessageService.java index 43f5c41..d9ce0e6 100644 --- a/src/main/java/cc/fascinated/bat/service/DiscordMessageService.java +++ b/src/main/java/cc/fascinated/bat/service/DiscordMessageService.java @@ -86,6 +86,9 @@ public class DiscordMessageService extends ListenerAdapter { BatGuild guild = guildService.getGuild(event.getGuild().getId()); BatUser user = userService.getUser(event.getAuthor().getId()); + if (guild == null || user == null) { + return; + } for (EventListener listener : EventService.LISTENERS) { listener.onGuildMessageEdit(guild, user, oldMessage, newMessage, event); }