Don't crash if the cheat file is inaccessible.

This commit is contained in:
Unknown W. Brackets 2013-10-13 17:56:52 -07:00
parent 24ead296f1
commit bbaacab315

View File

@ -219,6 +219,9 @@ std::vector<std::string> CWCheatEngine::GetCodesList() { //Reads the entire chea
std::string line;
std::vector<std::string> codesList; // Read from INI here
std::ifstream list(activeCheatFile.c_str());
if (!list) {
return codesList;
}
for (int i = 0; !list.eof(); i ++) {
getline(list, line, '\n');
if (line.length() > 3 && line.substr(0,1) == "_"){