Permalink
Browse files

Improve BVMLinkOpenManager error handling

  • Loading branch information...
1 parent 343e6af commit c284655a30aa1ff5fcb9824bb0cb5e7378b7e831 @cdzombak committed Mar 29, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 buyvmmanager/BVMLinkOpenManager.m
@@ -93,8 +93,10 @@ + (NSString *)replacementSchemeForScheme:(NSString *)scheme
+ (NSString *)nameForBrowser:(BVMBrowser)browser
{
- NSParameterAssert(browser < BVMNumBrowsers);
- NSParameterAssert(browser >= 0);
+ if (browser >= BVMNumBrowsers || browser < 0) {
+ NSLog(@"Unknown browser %d in %s", browser, __PRETTY_FUNCTION__);
+ return nil;
+ }
return kBVMBrowserNames[browser];
}

0 comments on commit c284655

Please sign in to comment.