Skip to content

Commit

Permalink
Fix for canceling SITL version selection messagebox. ISSUE #2741
Browse files Browse the repository at this point in the history
  • Loading branch information
EosBandi authored and meee1 committed Dec 12, 2021
1 parent 8bd25b4 commit 6ef22d4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions GCSViews/SITL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ private async Task<string> CheckandGetSITLImage(string filename)
url = sitlroverstableurl;
if (filename.ToLower().Contains("plane"))
url = sitlplanestableurl;
} else
{
return null;
}

Uri fullurl = new Uri(url, filename);
Expand Down Expand Up @@ -573,6 +576,10 @@ static string BraceMatch(string text, char braces, char bracee)

private async void StartSITL(string exepath, string model, string homelocation, string extraargs = "", int speedup = 1)
{

//If we got null, it means that the verison selection box was canceled.
if (exepath == null) return;

if (String.IsNullOrEmpty(homelocation))
{
CustomMessageBox.Show(Strings.Invalid_home_location, Strings.ERROR);
Expand Down

0 comments on commit 6ef22d4

Please sign in to comment.