From 67516b93d8f8184a77906a77a36120ab753824fb Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 26 Mar 2019 12:02:49 +0100 Subject: Fix T62515: crash when rendering finishes with mouse over progress bar. Tooltip should be copied entirely, not just the the argument because then the function and argument don't always match. --- source/blender/editors/interface/interface.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/interface') diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 361f2048d58..f4956a6fc5b 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -735,9 +735,12 @@ static bool ui_but_update_from_old_block(const bContext *C, uiBlock *block, uiBu if (oldbut->poin != (char *)oldbut) { SWAP(char *, oldbut->poin, but->poin); SWAP(void *, oldbut->func_argN, but->func_argN); - SWAP(void *, oldbut->tip_argN, but->tip_argN); } + /* Move tooltip from new to old. */ + SWAP(uiButToolTipFunc, oldbut->tip_func, but->tip_func); + SWAP(void *, oldbut->tip_argN, but->tip_argN); + oldbut->flag = (oldbut->flag & ~flag_copy) | (but->flag & flag_copy); oldbut->drawflag = (oldbut->drawflag & ~drawflag_copy) | (but->drawflag & drawflag_copy); -- cgit v1.2.3