Fix Attempt to free NULL pointer

Assert when snapping `Selection to ...` but without objects.
Missed in the last commit.
This commit is contained in:
mano-wii
2020-02-11 11:45:07 -03:00
parent dac4e48bb7
commit c939b4df18

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);