mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
fix: crash when clipboard is empty
This commit is contained in:
parent
22d5927aa5
commit
d3f7c31caf
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue