Fix Attempt to free NULL pointer

Assert when snapping `Selection to ...` but without objects.
Missed in the last commit.
This commit is contained in:
Germano Cavalcante 2020-02-11 11:45:07 -03:00
parent dac4e48bb7
commit c939b4df18
Notes: blender-bot 2023-12-08 16:39:08 +01:00
Referenced by issue #77572, Reference image opacity value doesn't work with Blender 2.83+ (Intel HD 630 with Mesa 20, regression from D6729)
1 changed files with 4 additions and 1 deletions

View File

@ -554,7 +554,10 @@ static int snap_selected_to_location(bContext *C,
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
}
}
MEM_freeN(objects);
if (objects) {
MEM_freeN(objects);
}
if (use_transform_skip_children) {
ED_object_xform_skip_child_container_update_all(xcs, bmain, depsgraph);