diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-09-04 11:15:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-09-04 11:20:51 +0300 |
commit | 7bb856b3c8b7a4a85a2e989a6840d488ea0d547c (patch) | |
tree | 1a5dd267b00a5ffa77ff58a4c26d675967a4c009 | |
parent | 571aead323dd4cb84d2a39894172c119d6dfbab5 (diff) |
Fix assert creating a tools tip
-rw-r--r-- | source/blender/editors/interface/interface_region_tooltip.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_region_tooltip.c b/source/blender/editors/interface/interface_region_tooltip.c index ae98798dd7b..d2d8e2dae2c 100644 --- a/source/blender/editors/interface/interface_region_tooltip.c +++ b/source/blender/editors/interface/interface_region_tooltip.c @@ -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'); |