diff options
author | Ton Roosendaal <ton@blender.org> | 2012-12-12 23:56:24 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2012-12-12 23:56:24 +0400 |
commit | 69ba2d3edb06d529be724431ef226eb57b248aa4 (patch) | |
tree | 24326077084873030ecaf986e1d2620d5a6cd43e /source/blender | |
parent | 8af6721eb5c94f29c3d4d21c0b1431dda3b1cf84 (diff) |
Crash, IRC report.
Moving panels in a buttons-region around was calling menu code, reading NULL pointer.
Seems to be an existing issue, not caused by my previous commit :)
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 258775867cc..4f6e184dceb 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -6927,11 +6927,12 @@ static int ui_handler_region_menu(bContext *C, wmEvent *event, void *UNUSED(user if (data->state == BUTTON_STATE_MENU_OPEN) { /* handle events for menus and their buttons recursively, * this will handle events from the top to the bottom menu */ - retval = ui_handle_menus_recursive(C, event, data->menu, 0); + if (data->menu) + retval = ui_handle_menus_recursive(C, event, data->menu, 0); /* handle events for the activated button */ if (retval == WM_UI_HANDLER_CONTINUE || event->type == TIMER) { - if (data->menu->menuretval) + if (data->menu && data->menu->menuretval) ui_handle_button_return_submenu(C, event, but); else ui_handle_button_event(C, event, but); |