There's probably no easy answer, as this kind of thing usually indicates corruption in Photoshop's memory that has occurred long before you exit.
I had the problem back on 2011 and it turned out to be very specific versions of the ATI display driver, as once I upgraded to their newer releases the problem vanished.
So... Make sure all the software that Photoshop relies upon or uses (display and other drivers, 3rd party plug-ins, and the rest of your system) is up to date with the latest versions available from the manufacturers, and maybe you'll get lucky that they will have fixed the problem already.
Most of the crash on quit bugs are due to third party plugins - though on MacOS there are also some OS bugs that cause crashes on quit as well.
Are you using any third party plugins?
What OS version are you using?
Have you installed all the updates for Photoshop, your plugins, your drivers, and the OS?