Fix for stability issues with the ExternalCommandPlugin.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2602 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2013-05-01 17:02:40 +00:00
parent 05b69667cf
commit 2a8e2475d8
2 changed files with 15 additions and 7 deletions

View file

@ -122,9 +122,13 @@ namespace ExternalCommand {
itemPlugInRoot = new ToolStripMenuItem();
itemPlugInRoot.Text = Language.GetString("externalcommand", "contextmenu_configure");
itemPlugInRoot.Tag = host;
string exePath = PluginUtils.GetExePath("cmd.exe");
if (exePath != null && File.Exists(exePath)) {
itemPlugInRoot.Image = PluginUtils.GetExeIcon(exePath, 0);
try {
string exePath = PluginUtils.GetExePath("cmd.exe");
if (exePath != null && File.Exists(exePath)) {
itemPlugInRoot.Image = PluginUtils.GetExeIcon(exePath, 0);
}
} catch (Exception ex) {
LOG.Warn("Couldn't get the cmd.exe image", ex);
}
itemPlugInRoot.Click += new System.EventHandler(ConfigMenuClick);