FLTK logo

[branch-1.3] d40093d - Fix crash when terminating any macOS app by cmd-Q

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 ]

[branch-1.3] d40093d - Fix crash when terminating any macOS app by cmd-Q "ManoloFLTK" Apr 12, 2021  
 
commit d40093dd3bfec83387e507b43d0dbf3ba18cbe21
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Mon Apr 12 09:05:40 2021 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Mon Apr 12 09:05:40 2021 +0200

    Fix crash when terminating any macOS app by cmd-Q

 src/Fl_cocoa.mm | 1 +
 1 file changed, 1 insertion(+)

diff --git src/Fl_cocoa.mm src/Fl_cocoa.mm
index 9d8fa3c..c9ee7d7 100644
--- src/Fl_cocoa.mm
+++ src/Fl_cocoa.mm
@@ -2516,6 +2516,7 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
 }
 - (void)resetCursorRects {
   Fl_Window *w = [(FLWindow*)[self window] getFl_Window];
+  if (!w) return;
   Fl_X *i = Fl_X::i(w);
   if (!i) return;  // fix for STR #3128
   // We have to have at least one cursor rect for invalidateCursorRectsForView
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'.