When creating rectangles and changing layers, there's the possibility of crashing. **To Reproduce** 1. Open Pinta 1. Draw rectangle 1. Create new layer 1. Switch to new layer 1. Draw another rectangle 1. Switch back to the first layer 1. Pinta crashes **Additional Info** [Crash dump](https://github.com/user-attachments/files/20258322/dump.txt) https://github.com/user-attachments/assets/3a6aa29a-bef1-49c1-83bb-d7071f9ee89b **Version** Latest git and 3.0