diff --git a/AppDelegate.m b/AppDelegate.m index 25066b0..9f07605 100644 --- a/AppDelegate.m +++ b/AppDelegate.m @@ -37,8 +37,12 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { BitLyParser * parser = [BitLyParser newWithURLFromString:[clip string_]]; [parser getData]; NSString * result = [parser parseXML]; - [growl_ growlString:result]; - [clip_ setData:result]; + if (result == nil) { + [growl_ growlString:@"No url in reply"]; + } else { + [growl_ growlString:result]; + [clip_ setData:result]; + } } [NSApp terminate:self]; @@ -72,8 +76,12 @@ - (void)shortenURL:(NSPasteboard *)pboard BitLyParser * parser = [BitLyParser newWithURLFromString:pboardString]; [parser getData]; NSString * result = [parser parseXML]; - [clip_ setData:result]; - [growl_ growlString:result]; + if (result == nil) { + [growl_ growlString:@"No url in reply"]; + } else { + [growl_ growlString:result]; + [clip_ setData:result]; + } } [NSApp terminate:self]; } diff --git a/Info.plist b/Info.plist index a434972..6d2cb4a 100644 --- a/Info.plist +++ b/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 0.4 + 0.6 NSMainNibFile MainMenu NSPrincipalClass