Fix T57737: crash displaying expanded tooltip for transform tool

Maniphest Tasks: T57737

Differential Revision: https://developer.blender.org/D3923
This commit is contained in:
Philipp Oeser 2018-11-09 13:14:10 +01:00
parent 0c8cf8fe7f
commit 3d0383d259
Notes: blender-bot 2023-02-14 11:00:17 +01:00
Referenced by issue #57737, select or move over the transform tool
Referenced by issue #57639, Crash related to ui_tooltip
2 changed files with 2 additions and 1 deletions

View File

@ -330,7 +330,7 @@ static bool ui_tooltip_data_append_from_keymap(
.color_id = UI_TIP_LC_MAIN,
.is_pad = true,
});
field->text = BLI_strdup(ot->description[0] ? ot->description : ot->name);
field->text = BLI_strdup(ot->description ? ot->description : ot->name);
}
/* Shortcut */
{

View File

@ -1170,6 +1170,7 @@ static void TRANSFORM_OT_from_gizmo(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Transform From Gizmo";
ot->description = "Transform selected items by mode type";
ot->idname = "TRANSFORM_OT_from_gizmo";
ot->flag = 0;