From 95025c6a3a285c9e9c5275589971dc019cf04715 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Tue, 28 May 2024 16:52:34 +0100 Subject: [PATCH] fix: allow null URI send --- VpSharp/src/Entities/VirtualParadiseAvatar.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/VpSharp/src/Entities/VirtualParadiseAvatar.cs b/VpSharp/src/Entities/VirtualParadiseAvatar.cs index 5100001..a91f2e3 100644 --- a/VpSharp/src/Entities/VirtualParadiseAvatar.cs +++ b/VpSharp/src/Entities/VirtualParadiseAvatar.cs @@ -280,17 +280,11 @@ public sealed class VirtualParadiseAvatar : IEquatable /// /// Sends a URI to this avatar. /// - /// The URI to send. + /// The URI to send. will remove the overlay for the user. /// The URL target. See for more information. /// The action cannot be performed on the client's current avatar. - /// is . - public Task SendUriAsync(Uri uri, UriTarget target = UriTarget.Browser) + public Task SendUriAsync(Uri? uri, UriTarget target = UriTarget.Browser) { - if (uri is null) - { - throw new ArgumentNullException(nameof(uri)); - } - // ReSharper disable once InconsistentlySynchronizedField if (this == _client.CurrentAvatar) { @@ -299,7 +293,7 @@ public sealed class VirtualParadiseAvatar : IEquatable lock (_client.Lock) { - _ = vp_url_send(_client.NativeInstanceHandle, Session, uri.ToString(), target); + _ = vp_url_send(_client.NativeInstanceHandle, Session, uri?.ToString() ?? string.Empty, target); } return Task.CompletedTask;