diff options
author | Matt Ebb <matt@mke3.net> | 2010-01-26 13:06:22 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-01-26 13:06:22 +0300 |
commit | e6c4aee39a955ded3357c412bea586fe72edd7ac (patch) | |
tree | 9b94a021c5967541084901774bb351a527189859 /source/blender/editors/interface | |
parent | 9cbbeb2d65075a9d0469352907610c90836d134c (diff) |
Fix [#20827] c26276 RMB on "clear" command in console menu crashes blender
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index b4da74b4664..7273dc2360e 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -3664,7 +3664,10 @@ static int ui_but_menu(bContext *C, uiBut *but) int w = uiLayoutGetWidth(layout); wmKeyMap *km; int kmi_id= WM_key_event_operator_id(C, but->optype->idname, but->opcontext, prop, 1, &km); - wmKeyMapItem *kmi = WM_keymap_item_find_id(km, kmi_id); + wmKeyMapItem *kmi; + + if (kmi_id) + kmi= WM_keymap_item_find_id(km, kmi_id); /* keyboard shortcuts */ if ((kmi) && ISKEYBOARD(kmi->type)) { |