fix: crash when clipboard is empty

This commit is contained in:
leo
2024-07-09 15:02:34 +08:00
parent 22d5927aa5
commit d3f7c31caf

View File

@@ -40,11 +40,15 @@ namespace SourceGit.Models
public static bool IsValidURL(string url)
{
if (string.IsNullOrWhiteSpace(url))
return false;
foreach (var fmt in URL_FORMATS)
{
if (fmt.IsMatch(url))
return true;
}
return false;
}