dborth / snes9xgx

Snes9x GX - Port of Snes9x for Wii
http://wiibrew.org/wiki/Snes9x_GX
Other
435 stars 64 forks source link

Fix a crash when selecting Cancel after removing an SD/USB device and reopening Snes9xGX #1034

Closed InfiniteBlueGX closed 1 year ago

InfiniteBlueGX commented 1 year ago

If you loaded a game from SD/USB, closed Snes9xGX, removed the device, then re-launched the app, an ErrorPromptRetry dialog would appear ("Device not found") asking to Retry or Cancel. If Cancel was selected with the device still removed, the app would crash.

In preferences.cpp, it was trying to create directories on the devices without first checking if they were mounted or not - this commit fixes the problem.