summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
Diffstat (limited to 'macosx')
-rw-r--r--macosx/ttkMacOSXTheme.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c
index 26a25b4..df597f4 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);