[Bf-blender-cvs] [67516b93d8f] master: Fix T62515: crash when rendering finishes with mouse over progress bar.

Brecht Van Lommel noreply at git.blender.org
Tue Mar 26 12:04:31 CET 2019


Commit: 67516b93d8f8184a77906a77a36120ab753824fb
Author: Brecht Van Lommel
Date:   Tue Mar 26 12:02:49 2019 +0100
Branches: master
https://developer.blender.org/rB67516b93d8f8184a77906a77a36120ab753824fb

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.

===================================================================

M	source/blender/editors/interface/interface.c

===================================================================

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);



More information about the Bf-blender-cvs mailing list