From 53d9614adbb728fc4db983c9bb817c6eea870994 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 26 Sep 2022 10:46:50 +0200 Subject: Fix crash under macOS 13 Ventura public beta 6 when closing menu window. Bizarrely, an NSMouseEntered event arrives returning nil to [event window]! --- src/Fl_cocoa.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index b7b7d22b7..47be438fc 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -975,7 +975,7 @@ static void cocoaMouseHandler(NSEvent *theEvent) fl_lock_function(); Fl_Window *window = (Fl_Window*)[(FLWindow*)[theEvent window] getFl_Window]; - if ( !window->shown() ) { + if (!window || !window->shown() ) { fl_unlock_function(); return; } -- cgit v1.2.3