Crash on Kodi 17rc3 exit

I’m getting a reproducible crash in CMediaSourceSettings::Clear on exit of kodi. I’m stopping X by “systemctl stop sddm”.

Crash log:
http://paste.ubuntu.com/23936150/

I’m also getting a reproducible crash in the Epg database. This happens on every other kodi startup. Restarting kodi after this crash works fine.
Crash log:
http://paste.ubuntu.com/23936410/