diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-04-29 09:38:27 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-04-29 09:38:27 +0200 |
| commit | a8da590d114c55c47b6b9d1a780559ce36285c57 (patch) | |
| tree | e382c24c1b66a148083dfca72e4e7c045fae34d5 /src | |
| parent | c74a4827564faf380e6836d9b3c591a9a2a24fe3 (diff) | |
Fix for issue #434 : Segfaults on macOS.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 5 |
1 files changed, 2 insertions, 3 deletions
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 |
