From ffcf6635f96fdb99b0a301d20514306bc83586c0 Mon Sep 17 00:00:00 2001 From: "avi@chromium.org" Date: Fri, 24 Jul 2009 13:15:13 +0000 Subject: When no theme is installed, don't attempt to tint buttons. BUG=http://crbug.com/17511 TEST=all toolbar buttons should be black Review URL: http://codereview.chromium.org/160032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21526 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/cocoa/gradient_button_cell.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'chrome/browser') diff --git a/chrome/browser/cocoa/gradient_button_cell.mm b/chrome/browser/cocoa/gradient_button_cell.mm index a0b31522..4e6462d 100644 --- a/chrome/browser/cocoa/gradient_button_cell.mm +++ b/chrome/browser/cocoa/gradient_button_cell.mm @@ -256,8 +256,10 @@ if (isTemplate) { NSColor* color = [theme iconColorForStyle:GTMThemeStyleToolBarButton state:YES]; - [color set]; - NSRectFillUsingOperation(cellFrame,NSCompositeSourceAtop); + if (color) { + [color set]; + NSRectFillUsingOperation(cellFrame, NSCompositeSourceAtop); + } } CGContextEndTransparencyLayer(context); -- cgit v1.1