[Bf-blender-cvs] [7beb487e9ad] master: Fix T104353: Crash on opening sculpting template

Germano Cavalcante noreply at git.blender.org
Mon Feb 6 13:19:51 CET 2023


Commit: 7beb487e9ad1908c8a67ae7caf46e462c2ac611a
Author: Germano Cavalcante
Date:   Mon Feb 6 09:20:20 2023 -0300
Branches: master
https://developer.blender.org/rB7beb487e9ad1908c8a67ae7caf46e462c2ac611a

Fix T104353: Crash on opening sculpting template

`t->region` was `NULL`.

It can happen depending on the context.

Caused by rB19b63b932d2b.

===================================================================

M	source/blender/editors/transform/transform_gizmo_3d.c

===================================================================

diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c
index 306502ab3bc..42f7336cec1 100644
--- a/source/blender/editors/transform/transform_gizmo_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_3d.c
@@ -2688,7 +2688,7 @@ static wmGizmoGroup *gizmogroup_xform_find(TransInfo *t)
 
 void transform_gizmo_3d_model_from_constraint_and_mode_init(TransInfo *t)
 {
-  wmGizmo *gizmo_modal_current = WM_gizmomap_get_modal(t->region->gizmo_map);
+  wmGizmo *gizmo_modal_current = t->region ? 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)) {



More information about the Bf-blender-cvs mailing list