Fix T81488: Deleting an Object Constraint crashes Blender

The edit_constraint_property_get function was using bone constraints
in pose mode even for object constraints. This change mirrors the code
in `uiTemplateConstraints` as well.

Differential Revision: https://developer.blender.org/D9128
This commit is contained in:
Hans Goudey 2020-10-06 13:07:36 -05:00
parent 55fd7f55bd
commit 43ceea30f1
Notes: blender-bot 2023-02-14 09:44:56 +01:00
Referenced by issue #81515, Third_party software fails to compile
Referenced by issue #81488, Deleting an Object Constraint crashes Blender
1 changed files with 1 additions and 1 deletions

View File

@ -818,7 +818,7 @@ static bConstraint *edit_constraint_property_get(bContext *C, wmOperator *op, Ob
list = ED_object_pose_constraint_list(C);
}
else {
list = ED_object_constraint_active_list(ob);
list = &ob->constraints;
}
con = BKE_constraints_find_name(list, constraint_name);