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.
}
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) {
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;