Fix minor error in last commit (4b35d6)

If there is no active object, it is to be expected that we are in
object mode as well.
This commit is contained in:
Germano Cavalcante 2022-03-22 17:30:03 -03:00
parent 4b35d6950d
commit cc3ec1fc6f
1 changed files with 1 additions and 1 deletions

View File

@ -496,7 +496,7 @@ static void iter_snap_objects(SnapObjectContext *sctx,
return;
}
const bool is_in_object_mode = base_act && base_act->object->mode == OB_MODE_OBJECT;
const bool is_in_object_mode = !base_act || base_act->object->mode == OB_MODE_OBJECT;
for (Base *base = view_layer->object_bases.first; base != NULL; base = base->next) {
if (!snap_object_is_snappable(sctx, snap_select, base_act, base, is_in_object_mode)) {
continue;