diff options
author | Severin <julian_eisel@web.de> | 2014-12-14 20:46:51 +0300 |
---|---|---|
committer | Severin <julian_eisel@web.de> | 2014-12-14 20:51:14 +0300 |
commit | ae6f62c4e2090ea8987bad9af67fad33cbe55966 (patch) | |
tree | 407936ed68bb4626f9da3334e312b22345e7217d /source/blender/editors | |
parent | c1d3532d2cbf85e1339026b7f77a4e8730124a50 (diff) |
IME fix: Quit two assert failures
We could now also remove the win->ime_data assert in wm_window_IME_end,
but think it's better to leave it for further development.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 31a6635c59c..413f87864f6 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -2436,6 +2436,8 @@ static void ui_textedit_ime_begin(wmWindow *win, uiBut *UNUSED(but)) /* XXX Is this really needed? */ int x, y; + BLI_assert(win->ime_data == NULL); + /* enable IME and position to cursor, it's a trick */ x = win->eventstate->x; /* flip y and move down a bit, prevent the IME panel cover the edit button */ @@ -2573,7 +2575,9 @@ static void ui_textedit_end(bContext *C, uiBut *but, uiHandleButtonData *data) WM_cursor_modal_restore(win); #ifdef WITH_INPUT_IME - ui_textedit_ime_end(win, but); + if (win->ime_data) { + ui_textedit_ime_end(win, but); + } #endif } |