[Bf-blender-cvs] [bc4c9fea770] asset-browser-snap-dragging: Fix crash when dragging emtpy into the 3D View

Julian Eisel noreply at git.blender.org
Fri Apr 30 20:36:00 CEST 2021


Commit: bc4c9fea770fb1effcf5ccc39b95265e5c0ddd32
Author: Julian Eisel
Date:   Fri Apr 30 20:35:36 2021 +0200
Branches: asset-browser-snap-dragging
https://developer.blender.org/rBbc4c9fea770fb1effcf5ccc39b95265e5c0ddd32

Fix crash when dragging emtpy into the 3D View

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

M	source/blender/editors/space_view3d/space_view3d.c

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

diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 1af785477b8..41bb0dedfea 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -636,7 +636,9 @@ static void view3d_ob_drop_copy(wmDrag *drag, wmDropBox *drop)
 static void view3d_ob_drag_gizmo_copy_local(wmDropBox *drop, Object *ob)
 {
   BoundBox *boundbox = BKE_object_boundbox_get(ob);
-  RNA_float_set_array(drop->gizmo_group_ptr, "bound_box", (float *)boundbox->vec);
+  if (boundbox) {
+    RNA_float_set_array(drop->gizmo_group_ptr, "bound_box", (float *)boundbox->vec);
+  }
   float matrix_basis[4][4];
   BKE_object_to_mat4(ob, matrix_basis);
   RNA_float_set_array(drop->gizmo_group_ptr, "matrix_basis", (float *)matrix_basis);



More information about the Bf-blender-cvs mailing list