Fix #104396: Blender crashes when moving Keyframes in Graph Editor

`t->region->gizmo_map` can be `nullptr`.

Caused by 19b63b932d
This commit is contained in:
Germano Cavalcante
2023-02-07 11:09:55 -03:00
parent 349350b304
commit 8d9d16fb53

View File

@@ -2713,7 +2713,9 @@ static wmGizmoGroup *gizmogroup_xform_find(TransInfo *t)
void transform_gizmo_3d_model_from_constraint_and_mode_init(TransInfo *t)
{
wmGizmo *gizmo_modal_current = t->region ? WM_gizmomap_get_modal(t->region->gizmo_map) : NULL;
wmGizmo *gizmo_modal_current = t->region && t->region->gizmo_map ?
WM_gizmomap_get_modal(t->region->gizmo_map) :
NULL;
if (!gizmo_modal_current || !ELEM(gizmo_modal_current->parent_gzgroup->type,
g_GGT_xform_gizmo,
g_GGT_xform_gizmo_context)) {