1
0
mirror of https://github.com/oliverbooth/VPLink synced 2024-11-23 00:08:47 +00:00

fix: null-check avatar on leave event

This commit is contained in:
Oliver Booth 2024-02-14 22:40:05 +00:00
parent 8538432e8c
commit 7f5be964c4
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5

View File

@ -63,6 +63,10 @@ internal sealed class AvatarService : BackgroundService, IAvatarService
private void OnVPAvatarLeft(VirtualParadiseAvatar avatar)
{
// ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
if (avatar is null)
return;
_logger.LogInformation("{Avatar} left ({User})", avatar, avatar.User);
IBotConfiguration configuration = _configurationService.BotConfiguration;