From e02ee7d5f11b31024e1fe91cf980a90641b1a2c4 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Thu, 5 May 2022 10:21:50 +0200 Subject: Add check against null pointer occurrence reported with Gmsh (Issue #434). --- src/Fl_cocoa.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 33e78feee..1fe7f68cc 100644 --- a/src/Fl_cocoa.mm +++ b/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 -- cgit v1.2.3