[Bf-blender-cvs] [dc26ef081b9] blender2.8: Fix T55198: Preferences Keybindings Crash

Julian Eisel noreply at git.blender.org
Fri May 25 14:05:10 CEST 2018


Commit: dc26ef081b98f0c475ccf79935360cf9986e2a02
Author: Julian Eisel
Date:   Fri May 25 14:01:25 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBdc26ef081b98f0c475ccf79935360cf9986e2a02

Fix T55198: Preferences Keybindings Crash

Operator sanitize function would be called for non operator props. Mistake from
88eafe078a5b5111c.

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

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

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

diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 683db8985c9..de1c1de4bcf 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -4626,6 +4626,9 @@ void UI_but_string_info_get(bContext *C, uiBut *but, ...)
 				PointerRNA *opptr = UI_but_operator_ptr_get(but);
 				wmOperatorType *ot = but->optype;
 
+				/* so the context is passed to itemf functions */
+				WM_operator_properties_sanitize(opptr, false);
+
 				/* if the default property of the operator is enum and it is set,
 				 * fetch the tooltip of the selected value so that "Snap" and "Mirror"
 				 * operator menus in the Anim Editors will show tooltips for the different
@@ -4645,9 +4648,6 @@ void UI_but_string_info_get(bContext *C, uiBut *but, ...)
 				if (!item) {
 					int i;
 
-					/* so the context is passed to itemf functions */
-					WM_operator_properties_sanitize(ptr, false);
-
 					RNA_property_enum_items_gettexted(C, ptr, prop, &items, &totitems, &free_items);
 					for (i = 0, item = items; i < totitems; i++, item++) {
 						if (item->identifier[0] && item->value == value)



More information about the Bf-blender-cvs mailing list