This changes fixes a wrong mesh as a result of apply base mesh from the Multires modifier
In the previous code some corner vertices where incorrectly assigned to null and skipped form processing as a safety guard
that was only relevant when the mesh had hidden faces in edit mode. The hidden corner vertices bug is handled now when checking
> if (corner_x_index < 0 || corner_y_index < 0) {
> continue;
> }
Since the patch that caused this error was a fix to a previous infinite loop bug,
I also tested and made sure this updated patch still fixes the original issue it was trying to fix.
Note: This PR replaces #122845 due to a large amount of git rebase issues.
Pull Request: https://projects.blender.org/blender/blender/pulls/122859