Fix crash under macOS 13 Ventura public beta 6 when closing menu window.

Bizarrely, an NSMouseEntered event arrives returning nil to [event window]!
This commit is contained in:
ManoloFLTK 2022-09-26 10:46:50 +02:00
parent 89f9671b40
commit 53d9614adb
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}