fix T83880: Added check for valid context object to avoid null pointer exception when no object in scene
This commit is contained in:
parent
478ba53270
commit
d283a093d6
Notes:
blender-bot
2023-02-14 03:03:03 +01:00
Referenced by issue #99209, [Sculpt] Masking crashes Blender when used after applying Remesh modifier in Sculpt mode Referenced by issue #84021, updating text object body from frame_change_post handler breaks transform animations in rendered output Referenced by issue #83880, Blender crashes when using F3 (Edit->Menu Search) while no active object in scene? Referenced by issue #83679, Cloth collision with rigidbody object doesn't work
|
@ -736,17 +736,19 @@ const EnumPropertyItem *ED_object_vgroup_selection_itemf_helper(const bContext *
|
|||
RNA_enum_items_add_value(&item, &totitem, WT_vertex_group_select_item, WT_VGROUP_ACTIVE);
|
||||
}
|
||||
|
||||
if (BKE_object_pose_armature_get(ob)) {
|
||||
if (selection_mask & (1 << WT_VGROUP_BONE_SELECT)) {
|
||||
RNA_enum_items_add_value(
|
||||
&item, &totitem, WT_vertex_group_select_item, WT_VGROUP_BONE_SELECT);
|
||||
if (ob) {
|
||||
if (BKE_object_pose_armature_get(ob)) {
|
||||
if (selection_mask & (1 << WT_VGROUP_BONE_SELECT)) {
|
||||
RNA_enum_items_add_value(
|
||||
&item, &totitem, WT_vertex_group_select_item, WT_VGROUP_BONE_SELECT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (BKE_modifiers_is_deformed_by_armature(ob)) {
|
||||
if (selection_mask & (1 << WT_VGROUP_BONE_DEFORM)) {
|
||||
RNA_enum_items_add_value(
|
||||
&item, &totitem, WT_vertex_group_select_item, WT_VGROUP_BONE_DEFORM);
|
||||
if (BKE_modifiers_is_deformed_by_armature(ob)) {
|
||||
if (selection_mask & (1 << WT_VGROUP_BONE_DEFORM)) {
|
||||
RNA_enum_items_add_value(
|
||||
&item, &totitem, WT_vertex_group_select_item, WT_VGROUP_BONE_DEFORM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue