[Bf-blender-cvs] [88eafe078a] workspaces: Fix crash when displaying tooltip of 'New Window' operator

Julian Eisel noreply at git.blender.org
Fri Mar 17 14:19:55 CET 2017


Commit: 88eafe078a5b5111c89795f03b43e56ebbed375a
Author: Julian Eisel
Date:   Fri Mar 17 14:19:19 2017 +0100
Branches: workspaces
https://developer.blender.org/rB88eafe078a5b5111c89795f03b43e56ebbed375a

Fix crash when displaying tooltip of 'New Window' operator

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

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

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

diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 62d5687244..15b3c73086 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -4620,7 +4620,10 @@ void UI_but_string_info_get(bContext *C, uiBut *but, ...)
 			if (ptr && prop) {
 				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)
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index b6a3cce7fe..224060c7ae 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -258,8 +258,9 @@ static void info_header_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegi
 	/* context changes */
 	switch (wmn->category) {
 		case NC_WORKSPACE:
-			if (ELEM(wmn->data, ND_SCREENCAST, ND_ANIMPLAY))
+			if (ELEM(wmn->data, ND_LAYER, ND_SCREENCAST, ND_ANIMPLAY)) {
 				ED_region_tag_redraw(ar);
+			}
 			break;
 		case NC_WM:
 			if (wmn->data == ND_JOB)




More information about the Bf-blender-cvs mailing list