Fix #119862: poly build crash when adding first vertex in empty geometry
object_index is not found (-1) when all mesh data is deleted hence it crashes when accessing base from the vector at index -1. So skip the further execution to prevent crash. Pull Request: https://projects.blender.org/blender/blender/pulls/119865
This commit is contained in:
committed by
Pratik Borhade
parent
cc580136c6
commit
436b9a5aae
@@ -505,7 +505,7 @@ void ED_view3d_gizmo_mesh_preselect_get_active(bContext *C,
|
||||
/* weak, allocate an array just to access the index. */
|
||||
Base *base = nullptr;
|
||||
Object *obedit = nullptr;
|
||||
{
|
||||
if (object_index != -1) {
|
||||
Vector<Base *> bases = BKE_view_layer_array_from_bases_in_edit_mode(
|
||||
scene, view_layer, CTX_wm_view3d(C));
|
||||
if (object_index < bases.size()) {
|
||||
|
||||
Reference in New Issue
Block a user