1.1 --- a/Framework/Source/GrowlApplicationBridge-Carbon.c Tue Jul 07 11:42:50 2009 -0400
1.2 +++ b/Framework/Source/GrowlApplicationBridge-Carbon.c Wed Jul 29 20:32:20 2009 -0400
1.3 @@ -113,9 +113,13 @@
1.4 delegate = newDelegate;
1.5 }
1.6
1.7 - CFStringRef appName = delegate->applicationName;
1.8 - if ((!appName) && (delegate->registrationDictionary))
1.9 - appName = CFDictionaryGetValue(delegate->registrationDictionary, GROWL_APP_NAME);
1.10 + CFStringRef appName = nil;
1.11 + if(delegate) {
1.12 + appName = delegate->applicationName;
1.13 + if ((!appName) && (delegate->registrationDictionary))
1.14 + appName = CFDictionaryGetValue(delegate->registrationDictionary, GROWL_APP_NAME);
1.15 + }
1.16 +
1.17 if (!appName) {
1.18 NSLog(CFSTR("%@"), CFSTR("GrowlApplicationBridge: Growl_SetDelegate called, but no application name was found in the delegate"));
1.19 return false;
1.20 @@ -969,6 +973,11 @@
1.21 if (bundleIdentifier && (CFStringCompare(bundleIdentifier, GROWL_PREFPANE_BUNDLE_IDENTIFIER, bundleIDComparisonFlags) == kCFCompareEqualTo)) {
1.22 growlPrefPaneBundle = prefPaneBundle;
1.23 }
1.24 + else {
1.25 + CFRelease(prefPaneBundle);
1.26 + prefPaneBundle = nil;
1.27 + }
1.28 +
1.29 }
1.30
1.31 if (!growlPrefPaneBundle) {
1.32 @@ -980,6 +989,11 @@
1.33 if (bundleIdentifier && (CFStringCompare(bundleIdentifier, GROWL_PREFPANE_BUNDLE_IDENTIFIER, bundleIDComparisonFlags) == kCFCompareEqualTo)) {
1.34 growlPrefPaneBundle = prefPaneBundle;
1.35 }
1.36 + else {
1.37 + CFRelease(prefPaneBundle);
1.38 + prefPaneBundle = nil;
1.39 + }
1.40 +
1.41 }
1.42
1.43 if (!growlPrefPaneBundle) {
1.44 @@ -991,6 +1005,11 @@
1.45 if (bundleIdentifier && (CFStringCompare(bundleIdentifier, GROWL_PREFPANE_BUNDLE_IDENTIFIER, bundleIDComparisonFlags) == kCFCompareEqualTo)) {
1.46 growlPrefPaneBundle = prefPaneBundle;
1.47 }
1.48 + else {
1.49 + CFRelease(prefPaneBundle);
1.50 + prefPaneBundle = nil;
1.51 + }
1.52 +
1.53 }
1.54 }
1.55 }