mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 09:08:01 +01:00
Fix NPE when using avatars in discord module (Fixes #5748)
This commit is contained in:
parent
b392f03ad1
commit
9e57dd6aef
@ -383,11 +383,10 @@ public class JDADiscordService implements DiscordService, IEssentialsModule {
|
||||
|
||||
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());
|
||||
|
Loading…
Reference in New Issue
Block a user