mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +00: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…
Add table
Add a link
Reference in a new issue