Fix crash when selecting "Unwrap UV2 for Lightmap/AO" after undo

This commit is contained in:
mxtherfxcker 2026-01-04 13:42:52 +03:00
parent 05c097e5e2
commit 6852107035

View file

@ -550,11 +550,8 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
ur->create_action(TTR("Unwrap UV2"));
ur->add_do_method(node, "set_mesh", unwrapped_mesh);
ur->add_do_reference(node);
ur->add_do_reference(array_mesh.ptr());
ur->add_do_reference(unwrapped_mesh.ptr());
ur->add_undo_method(node, "set_mesh", array_mesh);
ur->add_undo_reference(unwrapped_mesh.ptr());
ur->commit_action();
}