summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorculler <culler>2020-09-08 20:28:57 (GMT)
committerculler <culler>2020-09-08 20:28:57 (GMT)
commitb3a1dc834a344eeb6eb6c42eee5747023e39385e (patch)
tree45113bd831dd7cc824a5b0cccf946019eee91365 /macosx
parent1cebfa6aa3095dcdb4dbcf81186a0090a5ef2b8b (diff)
downloadtk-b3a1dc834a344eeb6eb6c42eee5747023e39385e.zip
tk-b3a1dc834a344eeb6eb6c42eee5747023e39385e.tar.gz
tk-b3a1dc834a344eeb6eb6c42eee5747023e39385e.tar.bz2
Fix [2a6d63b9dc]: crash in macOS 10.6 when de-activating wish with Option-tab
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);