diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-08-28 23:09:09 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-08-28 23:09:19 +0300 |
commit | 744eb1172e3ba16af21813de6c1e772490a68b91 (patch) | |
tree | fface9d17650558d425c2d420855a58ab53bbaa9 /source | |
parent | b78a439e9071f83baf296d52c0c1a458aecd2938 (diff) |
Fix T80195: crash when invoking tooltips on MacOS
Problem introduced in rBadd48c007428.
`UI_but_string_info_get` can change the value of the args.
Diffstat (limited to 'source')
3 files changed, 20 insertions, 20 deletions
diff --git a/source/blender/editors/interface/interface_context_menu.c b/source/blender/editors/interface/interface_context_menu.c index 9889c81ca55..02a9c3742d7 100644 --- a/source/blender/editors/interface/interface_context_menu.c +++ b/source/blender/editors/interface/interface_context_menu.c @@ -517,7 +517,7 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but) uiLayout *layout; { - const uiStringInfo label = {BUT_GET_LABEL, NULL}; + uiStringInfo label = {BUT_GET_LABEL, NULL}; /* highly unlikely getting the label ever fails */ UI_but_string_info_get(C, but, &label, NULL); diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index 82e6e01056c..d6919fb4de7 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -1474,16 +1474,16 @@ static int edittranslation_exec(bContext *C, wmOperator *op) const char *root = U.i18ndir; const char *uilng = BLT_lang_get(); - const uiStringInfo but_label = {BUT_GET_LABEL, NULL}; - const uiStringInfo rna_label = {BUT_GET_RNA_LABEL, NULL}; - const uiStringInfo enum_label = {BUT_GET_RNAENUM_LABEL, NULL}; - const uiStringInfo but_tip = {BUT_GET_TIP, NULL}; - const uiStringInfo rna_tip = {BUT_GET_RNA_TIP, NULL}; - const uiStringInfo enum_tip = {BUT_GET_RNAENUM_TIP, NULL}; - const uiStringInfo rna_struct = {BUT_GET_RNASTRUCT_IDENTIFIER, NULL}; - const uiStringInfo rna_prop = {BUT_GET_RNAPROP_IDENTIFIER, NULL}; - const uiStringInfo rna_enum = {BUT_GET_RNAENUM_IDENTIFIER, NULL}; - const uiStringInfo rna_ctxt = {BUT_GET_RNA_LABEL_CONTEXT, NULL}; + uiStringInfo but_label = {BUT_GET_LABEL, NULL}; + uiStringInfo rna_label = {BUT_GET_RNA_LABEL, NULL}; + uiStringInfo enum_label = {BUT_GET_RNAENUM_LABEL, NULL}; + uiStringInfo but_tip = {BUT_GET_TIP, NULL}; + uiStringInfo rna_tip = {BUT_GET_RNA_TIP, NULL}; + uiStringInfo enum_tip = {BUT_GET_RNAENUM_TIP, NULL}; + uiStringInfo rna_struct = {BUT_GET_RNASTRUCT_IDENTIFIER, NULL}; + uiStringInfo rna_prop = {BUT_GET_RNAPROP_IDENTIFIER, NULL}; + uiStringInfo rna_enum = {BUT_GET_RNAENUM_IDENTIFIER, NULL}; + uiStringInfo rna_ctxt = {BUT_GET_RNA_LABEL_CONTEXT, NULL}; if (!BLI_is_dir(root)) { BKE_report(op->reports, diff --git a/source/blender/editors/interface/interface_region_tooltip.c b/source/blender/editors/interface/interface_region_tooltip.c index afeeb4cedc9..b3a65e024f3 100644 --- a/source/blender/editors/interface/interface_region_tooltip.c +++ b/source/blender/editors/interface/interface_region_tooltip.c @@ -535,7 +535,7 @@ static uiTooltipData *ui_tooltip_data_from_tool(bContext *C, uiBut *but, bool is char *shortcut = NULL; { - const uiStringInfo op_keymap = {BUT_GET_OP_KEYMAP, NULL}; + uiStringInfo op_keymap = {BUT_GET_OP_KEYMAP, NULL}; UI_but_string_info_get(C, but, &op_keymap, NULL); shortcut = op_keymap.strinfo; } @@ -768,14 +768,14 @@ static uiTooltipData *ui_tooltip_data_from_tool(bContext *C, uiBut *but, bool is static uiTooltipData *ui_tooltip_data_from_button(bContext *C, uiBut *but) { - const uiStringInfo but_label = {BUT_GET_LABEL, NULL}; - const uiStringInfo but_tip = {BUT_GET_TIP, NULL}; - const uiStringInfo enum_label = {BUT_GET_RNAENUM_LABEL, NULL}; - const uiStringInfo enum_tip = {BUT_GET_RNAENUM_TIP, NULL}; - const uiStringInfo op_keymap = {BUT_GET_OP_KEYMAP, NULL}; - const uiStringInfo prop_keymap = {BUT_GET_PROP_KEYMAP, NULL}; - const uiStringInfo rna_struct = {BUT_GET_RNASTRUCT_IDENTIFIER, NULL}; - const uiStringInfo rna_prop = {BUT_GET_RNAPROP_IDENTIFIER, NULL}; + uiStringInfo but_label = {BUT_GET_LABEL, NULL}; + uiStringInfo but_tip = {BUT_GET_TIP, NULL}; + uiStringInfo enum_label = {BUT_GET_RNAENUM_LABEL, NULL}; + uiStringInfo enum_tip = {BUT_GET_RNAENUM_TIP, NULL}; + uiStringInfo op_keymap = {BUT_GET_OP_KEYMAP, NULL}; + uiStringInfo prop_keymap = {BUT_GET_PROP_KEYMAP, NULL}; + uiStringInfo rna_struct = {BUT_GET_RNASTRUCT_IDENTIFIER, NULL}; + uiStringInfo rna_prop = {BUT_GET_RNAPROP_IDENTIFIER, NULL}; char buf[512]; |