FLTK logo

[master] e02ee7d - Add check against null pointer occurrence reported with Gmsh (Issue #434).

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] e02ee7d - Add check against null pointer occurrence reported with Gmsh (Issue #434). "ManoloFLTK" May 05, 2022  
 
commit e02ee7d5f11b31024e1fe91cf980a90641b1a2c4
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Thu May 5 10:21:50 2022 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Thu May 5 10:21:50 2022 +0200

    Add check against null pointer occurrence reported with Gmsh (Issue #434).

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

diff --git src/Fl_cocoa.mm src/Fl_cocoa.mm
index 33e78fe..1fe7f68 100644
--- src/Fl_cocoa.mm
+++ src/Fl_cocoa.mm
@@ -2284,6 +2284,7 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
   FLWindow *cw = (FLWindow*)[self window];
   Fl_Window *window = [cw getFl_Window];
   if (!window) return; // may happen after closing full-screen window
+  if (!Fl_X::i(window)) return; // reported to happen with Gmsh (issue #434)
   fl_lock_function();
   Fl_Cocoa_Window_Driver *d = Fl_Cocoa_Window_Driver::driver(window);
   if (!through_Fl_X_flush
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'.