Skip to content

Commit

Permalink
Infinite loop when browsing for cppcheck.exe removed (fixed #182)
Browse files Browse the repository at this point in the history
  • Loading branch information
VioletGiraffe committed Feb 16, 2018
1 parent f48c2af commit ce8fb04
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions CPPCheckPlugin/AnalyzerCppcheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,16 @@ public static string cppcheckExePath()

if (String.IsNullOrEmpty(analyzerPath))
{
for (; ; )
{
OpenFileDialog dialog = new OpenFileDialog();
dialog.Filter = "cppcheck executable|cppcheck.exe";
if (dialog.ShowDialog() != DialogResult.OK)
continue;
OpenFileDialog dialog = new OpenFileDialog();
dialog.Filter = "cppcheck executable|cppcheck.exe";
if (dialog.ShowDialog() != DialogResult.OK)
return String.Empty;

analyzerPath = dialog.FileName;
if (File.Exists(analyzerPath))
{
Properties.Settings.Default.CPPcheckPath.Add(analyzerPath);
Properties.Settings.Default.Save();
break;
}
analyzerPath = dialog.FileName;
if (File.Exists(analyzerPath))
{
Properties.Settings.Default.CPPcheckPath.Add(analyzerPath);
Properties.Settings.Default.Save();
}
}

Expand Down

0 comments on commit ce8fb04

Please sign in to comment.