From b3a1dc834a344eeb6eb6c42eee5747023e39385e Mon Sep 17 00:00:00 2001 From: culler Date: Tue, 8 Sep 2020 20:28:57 +0000 Subject: Fix [2a6d63b9dc]: crash in macOS 10.6 when de-activating wish with Option-tab --- macosx/ttkMacOSXTheme.c | 7 +++++-- 1 file 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); -- cgit v0.12