Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-11-30 00:01:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-30 00:03:30 +0300
commit6dbc820633eb06d66bb9cbf6880ec7b37c622cd9 (patch)
treee9963c513977b01bdd99b3e376c4b72b946662bb /source
parent0487089c3146755dd7a19238cd9595744c5fee65 (diff)
Fix crash creating enum tooltips
Error from recent changes to shortcut display.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/interface.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 443ff55d8b4..82238744205 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -1059,6 +1059,11 @@ static bool ui_but_event_property_operator_string(
char *buf, const size_t buf_len)
{
/* context toggle operator names to check... */
+
+ /* This function could use a refactor to generalize button type to operator relationship
+ * as well as which operators use properties.
+ * - Campbell
+ * */
const char *ctx_toggle_opnames[] = {
"WM_OT_context_toggle",
"WM_OT_context_toggle_enum",
@@ -1092,8 +1097,9 @@ static bool ui_but_event_property_operator_string(
if ((but->type == UI_BTYPE_BUT_MENU) && (but->block->handle != NULL)) {
uiBut *but_parent = but->block->handle->popup_create_vars.but;
if ((but->type == UI_BTYPE_BUT_MENU) &&
+ (but_parent && but_parent->rnaprop) &&
(RNA_property_type(but_parent->rnaprop) == PROP_ENUM) &&
- but_parent && (but_parent->menu_create_func == ui_def_but_rna__menu))
+ (but_parent->menu_create_func == ui_def_but_rna__menu))
{
prop_enum_value = (int)but->hardmin;
ptr = &but_parent->rnapoin;