Fix assert creating a tools tip

This commit is contained in:
Campbell Barton
2018-09-04 18:15:25 +10:00
parent 571aead323
commit 7bb856b3c8

View File

@@ -378,6 +378,11 @@ static uiTooltipData *ui_tooltip_data_from_tool(bContext *C, uiBut *but)
return NULL;
}
/* Needed to get the space-data's type (below). */
if (CTX_wm_space_data(C) == NULL) {
return NULL;
}
char tool_name[MAX_NAME];
RNA_string_get(but->opptr, "name", tool_name);
BLI_assert(tool_name[0] != '\0');