diff --git a/GCSViews/SITL.cs b/GCSViews/SITL.cs index 0d32e2369e..d2af256c56 100644 --- a/GCSViews/SITL.cs +++ b/GCSViews/SITL.cs @@ -389,6 +389,9 @@ private async Task CheckandGetSITLImage(string filename) url = sitlroverstableurl; if (filename.ToLower().Contains("plane")) url = sitlplanestableurl; + } else + { + return null; } Uri fullurl = new Uri(url, filename); @@ -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);