Skip to content

Commit

Permalink
Fix NPE when using avatars in discord module (Fixes #5748)
Browse files Browse the repository at this point in the history
  • Loading branch information
JRoy committed Jul 2, 2024
1 parent b392f03 commit 9e57dd6
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -383,11 +383,10 @@ public void updateTypesRelay() {

final Webhook webhook = DiscordUtil.getOrCreateWebhook(channel, DiscordUtil.ADVANCED_RELAY_NAME).join();
if (webhook == null) {
final WrappedWebhookClient current = channelIdToWebhook.get(channel.getId());
final WrappedWebhookClient current = channelIdToWebhook.remove(channel.getId());
if (current != null) {
current.close();
}
channelIdToWebhook.remove(channel.getId()).close();
continue;
}
typeToChannelId.put(type, channel.getId());
Expand Down

0 comments on commit 9e57dd6

Please sign in to comment.