From 69ba2d3edb06d529be724431ef226eb57b248aa4 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 12 Dec 2012 19:56:24 +0000 Subject: 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 :) --- source/blender/editors/interface/interface_handlers.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source') 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); -- cgit v1.2.3