Fix potential nullref in embedBuilder value setter (#734)
* Fix potential nullref in embedBuilder value setter * Null check on footer iconUrl * Adding checks for the other URL properties * Adding IsNullOrUri extension * Setting StringExtensions as internal
This commit is contained in:
committed by
RogueException
parent
8cd99beb62
commit
d89804d7c7
10
src/Discord.Net.Core/Extensions/StringExtensions.cs
Normal file
10
src/Discord.Net.Core/Extensions/StringExtensions.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace Discord
|
||||
{
|
||||
internal static class StringExtensions
|
||||
{
|
||||
public static bool IsNullOrUri(this string url) =>
|
||||
string.IsNullOrEmpty(url) || Uri.IsWellFormedUriString(url, UriKind.Absolute);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user