diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 77f7c1085..06f801e64 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -1929,6 +1929,7 @@ static void cocoaKeyboardHandler(NSEvent *theEvent) - (void)resetCursorRects { Fl_Window *w = [(FLWindow*)[self window] getFl_Window]; 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 // to work, hence the "else" clause. if (i->cursor)