From 01da7e813e194363634e30b37e6407ca0812a8d4 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Fri, 23 Dec 2022 17:04:08 +0100 Subject: [PATCH] Fixed a nullref in streamrole service --- src/NadekoBot/Modules/Utility/StreamRole/StreamRoleService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Utility/StreamRole/StreamRoleService.cs b/src/NadekoBot/Modules/Utility/StreamRole/StreamRoleService.cs index d8595d7cf..57b577e5d 100644 --- a/src/NadekoBot/Modules/Utility/StreamRole/StreamRoleService.cs +++ b/src/NadekoBot/Modules/Utility/StreamRole/StreamRoleService.cs @@ -39,7 +39,8 @@ public class StreamRoleService : IReadyExecutor, INService if (oldPresence.Activities.Count != newPresence.Activities.Count) { var guildUsers = _client.Guilds - .Select(x => x.GetUser(user.Id)); + .Select(x => x.GetUser(user.Id)) + .Where(x => x is not null); foreach (var guildUser in guildUsers) {