diff options
Diffstat (limited to 'macosx/ttkMacOSXTheme.c')
-rw-r--r-- | macosx/ttkMacOSXTheme.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index 8c9e564..65c889c 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -501,10 +501,13 @@ static void SolidFillRoundedRectangle( NSColor *color) { CGPathRef path; - CHECK_RADIUS(radius, bounds) - CGContextSetFillColorWithColor(context, CGCOLOR(color)); + CHECK_RADIUS(radius, bounds) path = CGPathCreateWithRoundedRect(bounds, radius, radius, NULL); + if (!path) { + return; + } + CGContextSetFillColorWithColor(context, CGCOLOR(color)); CGContextBeginPath(context); CGContextAddPath(context, path); CGContextFillPath(context); |