This is/was a known bug which is supposedly fixed in 5.0.1. of the main program. See:
To reproduce (as per bug report):
Open LO Writer, select Gallery > Sounds, right click on a sound file and select preview. Media Player launches and plays sound. Close Media Player and LibreOffice Portable will crash.
Obviously, the helpful little media player is a work in progress for LO, but this is now working without crash on exit in version 188.8.131.52