From a8da590d114c55c47b6b9d1a780559ce36285c57 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Fri, 29 Apr 2022 09:38:27 +0200 Subject: Fix for issue #434 : Segfaults on macOS. --- src/Fl_cocoa.mm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 2ad838785..33e78feee 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -2410,8 +2410,7 @@ static FLTextInputContext* fltextinputcontext_instance = nil; #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 - (void)updateTrackingAreas { if (fl_mac_os_version >= 100500) { - Fl_Window *win = [(FLWindow*)[self window] getFl_Window]; - if (!win->parent()) { + if (![[self window] parentWindow]) { while (true) { NSArray *a = [self trackingAreas]; // 10.5 if ([a count] == 0) break; @@ -2428,8 +2427,8 @@ static FLTextInputContext* fltextinputcontext_instance = nil; if (tracking) { [self addTrackingArea:tracking]; // 10.5 } - [super updateTrackingAreas]; } + [super updateTrackingAreas]; } } #endif -- cgit v1.2.3