mirror of
https://github.com/fltk/fltk.git
synced 2026-06-06 16:46:52 +08:00
Avoid potential crash if Fl::focus() returns NULL.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10527 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+2
-1
@@ -2256,7 +2256,8 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
|
||||
Fl::first_window(window);
|
||||
cocoaKeyboardHandler(theEvent);
|
||||
in_key_event = YES;
|
||||
if (Fl::focus()->as_gl_window()) { // ignore text input methods for GL windows
|
||||
Fl_Widget *f = Fl::focus();
|
||||
if (f && f->as_gl_window()) { // ignore text input methods for GL windows
|
||||
need_handle = YES;
|
||||
[FLView prepareEtext:[theEvent characters]];
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user