diff --git a/src/frontend/qt_sdl/ROMManager.cpp b/src/frontend/qt_sdl/ROMManager.cpp index d24e21ab..304862eb 100644 --- a/src/frontend/qt_sdl/ROMManager.cpp +++ b/src/frontend/qt_sdl/ROMManager.cpp @@ -87,6 +87,7 @@ std::string GetAssetPath(bool gba, std::string configpath, std::string ext, std: for (;;) { int i = configpath.length() - 1; + if (i < 0) break; if (configpath[i] == '/' || configpath[i] == '\\') configpath = configpath.substr(0, i); else