FLTK logo

[master] 53d9614 - Fix crash under macOS 13 Ventura public beta 6 when closing menu window. Bizarrely, an NSMouseEntered event arrives returning nil to [event window]!

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 53d9614 - Fix crash under macOS 13 Ventura public beta 6 when closing menu window. Bizarrely, an NSMouseEntered event arrives returning nil to [event window]! "ManoloFLTK" Sep 26, 2022  
 
commit 53d9614adbb728fc4db983c9bb817c6eea870994
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Mon Sep 26 10:46:50 2022 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Mon Sep 26 10:46:50 2022 +0200

    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(-)

diff --git src/Fl_cocoa.mm src/Fl_cocoa.mm
index b7b7d22..47be438 100644
--- src/Fl_cocoa.mm
+++ 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;
   }
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.