Fix #137700: Guard null lt.editlatt in DRW_cache_lattice_wire_get
Switching to lattice edit mode when it has an armature modifier can crash if the armature modifier's `show_in_editmode` is turned on. Now prevent null `editlatt` access. Pull Request: https://projects.blender.org/blender/blender/pulls/137701
This commit is contained in:
committed by
Brecht Van Lommel
parent
57ad7d1277
commit
d93b0a479a
@@ -3018,7 +3018,9 @@ blender::gpu::Batch *DRW_cache_lattice_wire_get(Object *ob, bool use_weight)
|
||||
Lattice *lt = static_cast<Lattice *>(ob->data);
|
||||
int actdef = -1;
|
||||
|
||||
if (use_weight && !BLI_listbase_is_empty(<->vertex_group_names) && lt->editlatt->latt->dvert) {
|
||||
if (use_weight && !BLI_listbase_is_empty(<->vertex_group_names) && lt->editlatt &&
|
||||
lt->editlatt->latt->dvert)
|
||||
{
|
||||
actdef = lt->vertex_group_active_index - 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user