UI: alternate fix for empty context menu
authorCampbell Barton <ideasman42@gmail.com>
Sat, 23 Jun 2018 08:31:10 +0000 (10:31 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 23 Jun 2018 08:31:10 +0000 (10:31 +0200)
commitf8a3636374b76f6db31be21beaa0e40857644bc4
tree59cc2b172d8bf0e2eb0d838c2ac127029c0b0027
parent6cd0484de8c765e5ce0f2072c7b10af0794ce7f8
UI: alternate fix for empty context menu

block and layout could be NULL and checking this everywhere
wasn't practical.

Instead of lazy initializing, add UI_popup_menu_end_or_cancel
which cancels empty popup menus.
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_region_menu_popup.c