-
-
Notifications
You must be signed in to change notification settings - Fork 732
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
8cd99be
commit d89804d
Showing
2 changed files
with
17 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters