Anyone having a recent segmentation fault with GIMP 2.10.36 when closing a file without saving changes, the issue has been fixed and will be merged into the next point release. 2.10.38.

More info here: (scroll to bottom) https://gitlab.gnome.org/GNOME/gimp/-/issues/10785