From 8f69c914080a7fe9555f7126362f08c368a8069d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 2 Dec 2021 15:46:14 +1100 Subject: Fix T93410: Crash hiding a region from Python used by a popover Close all active buttons when hiding a region as this can be called from Python a popover is open from that region. Failure to do this causes the popover to read from the freed button. Also rename UI_screen_free_active_but to UI_screen_free_active_but_highlight since it only frees highlighted buttons. --- source/blender/editors/interface/interface_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/interface/interface_ops.c') diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index e1fd7386408..03422e8f520 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -1408,7 +1408,7 @@ static int editsource_exec(bContext *C, wmOperator *op) int ret; /* needed else the active button does not get tested */ - UI_screen_free_active_but(C, CTX_wm_screen(C)); + UI_screen_free_active_but_highlight(C, CTX_wm_screen(C)); // printf("%s: begin\n", __func__); -- cgit v1.2.3