From 880710cfb0d045c388b65a109b03d90af9566316 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 3 Dec 2008 15:49:41 +0000 Subject: [PATCH] 2.5 Fix crashing in pop-up menus when click. There's something wrong still in handling menu itself, need Brecht too look at that... probably a wrong return value somewhere. --- source/blender/editors/interface/interface_ops.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index 61b7475eca2..c68ea719a13 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -2941,10 +2941,11 @@ static int button_activate_modal(bContext *C, wmOperator *op, wmEvent *event) } break; + default: + handled= ui_do_button(C, block, but, event); } } - handled= ui_do_button(C, block, but, event); } else if(data->state == BUTTON_STATE_WAIT_RELEASE) { switch(event->type) { @@ -3248,6 +3249,10 @@ static int menu_block_handle_modal(bContext *C, wmOperator *op, wmEvent *event) ar= bhandle->region; block= ar->uiblocks.first; + /* XXX (for brecht) this happens when click on menu */ + if(block==NULL) + return OPERATOR_FINISHED; + act= 0; handled= 0;