[Win32][Lin][RPi] Closing preferences results in crash