diff options
author | Therzok <teromario@yahoo.com> | 2013-09-09 20:22:51 +0400 |
---|---|---|
committer | Therzok <teromario@yahoo.com> | 2013-09-09 20:23:10 +0400 |
commit | 74e9fb0903ac7041b2d4b14f5cae83f72a079f68 (patch) | |
tree | b52b7791cee86bc5cb9bb6aea1cd01b403b45955 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools | |
parent | 9c60bbf612f226c82f193102bcfb99877e99a934 (diff) |
Bug 14415 - Unable to add External Tool in Xamarin Studio->Preference
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalToolPanel.cs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalToolPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalToolPanel.cs index abe5dbccf6..6fde8c756a 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalToolPanel.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalToolPanel.cs @@ -308,14 +308,23 @@ namespace MonoDevelop.Ide.ExternalTools do { // loop through items in the tree ExternalTool tool = toolListBox.Model.GetValue (current, 1) as ExternalTool; + if (tool == null) { + continue; + } + + if (String.IsNullOrEmpty (tool.Command)) { + MessageService.ShowError (String.Format (GettextCatalog.GetString ("The command of tool \"{0}\" is not set."), tool.MenuCommand)); + return false; + } + string path = FilterPath (tool.Command); if (!FileService.IsValidPath (path)) { - MessageService.ShowError (String.Format(GettextCatalog.GetString ("The command of tool \"{0}\" is invalid."), tool.MenuCommand)); + MessageService.ShowError (String.Format (GettextCatalog.GetString ("The command of tool \"{0}\" is invalid."), tool.MenuCommand)); return false; } path = FilterPath (tool.InitialDirectory); if ((tool.InitialDirectory != "") && !FileService.IsValidPath (path)) { - MessageService.ShowError (String.Format(GettextCatalog.GetString ("The working directory of tool \"{0}\" is invalid.") ,tool.MenuCommand)); + MessageService.ShowError (String.Format (GettextCatalog.GetString ("The working directory of tool \"{0}\" is invalid.") ,tool.MenuCommand)); return false; } } while (toolListBox.Model.IterNext (ref current)); |