|
@@ -360,11 +360,18 @@ void Browser::ShowAboutPanel() {
|
|
|
NSDictionary* options = DictionaryValueToNSDictionary(about_panel_options_);
|
|
|
|
|
|
// Credits must be a NSAttributedString instead of NSString
|
|
|
- id credits = options[@"Credits"];
|
|
|
+ NSString* credits = (NSString*)options[@"Credits"];
|
|
|
if (credits != nil) {
|
|
|
- NSMutableDictionary* mutable_options = [options mutableCopy];
|
|
|
- mutable_options[@"Credits"] = [[[NSAttributedString alloc]
|
|
|
- initWithString:(NSString*)credits] autorelease];
|
|
|
+ base::scoped_nsobject<NSMutableDictionary> mutable_options(
|
|
|
+ [options mutableCopy]);
|
|
|
+ base::scoped_nsobject<NSAttributedString> creditString(
|
|
|
+ [[NSAttributedString alloc]
|
|
|
+ initWithString:credits
|
|
|
+ attributes:@{
|
|
|
+ NSForegroundColorAttributeName : [NSColor textColor]
|
|
|
+ }]);
|
|
|
+
|
|
|
+ [mutable_options setValue:creditString forKey:@"Credits"];
|
|
|
options = [NSDictionary dictionaryWithDictionary:mutable_options];
|
|
|
}
|
|
|
|