When the modifier is disabled with level 0, the corner_vert array wasn't properly created in the subdivided mesh. The simplest solution is to just skip the subdiv processing for the unwrap when the level is 0 and nothing would happen anyway. Pull Request: https://projects.blender.org/blender/blender/pulls/129447