Skip to content

Commit

Permalink
added exception for IE...
Browse files Browse the repository at this point in the history
  • Loading branch information
zumoshi committed Dec 16, 2016
1 parent 356af71 commit 43ce533
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions BrowserSelect/Browser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,13 @@ private static List<Browser> find(RegistryKey hklm)
// because of the try catch, but there are still things that could go wrong

//0. check if it can handle the http protocol
if ((string)key.OpenSubKey("Capabilities").OpenSubKey("URLAssociations").GetValue("http") == null)
continue;
var capabilities = key.OpenSubKey("Capabilities");
// IE does not have the capabilities subkey...
// so assume that the app can handle http if it doesn't
// advertise it's capablities
if(capabilities != null)
if ((string)capabilities.OpenSubKey("URLAssociations").GetValue("http") == null)
continue;
//1. check if path is not empty
if (string.IsNullOrWhiteSpace(exec))
continue;
Expand Down

0 comments on commit 43ce533

Please sign in to comment.