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:
Pat Murphy
2017-07-05 16:56:43 -07:00
committed by RogueException
parent 8cd99beb62
commit d89804d7c7
2 changed files with 17 additions and 7 deletions

View 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);
}
}