https://github.com/emacs-mirror/emacs/commit/d005e685e1df7692085378633348db39a5190374 doesn't do what it says it does in the commit header, and is very likely the one that introduced the crash.

--
 Dominique Quatravaux
 dominique@quatravaux.org