Fix crash when displaying tooltip of 'New Window' operator

This commit is contained in:
Julian Eisel
2017-03-17 14:19:19 +01:00
parent 6287d254b4
commit 88eafe078a
2 changed files with 6 additions and 2 deletions

View File

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

View File

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