Permalink
Browse files

Fix crash bug when cleaning duplicates of recent files

  • Loading branch information...
hrydgard committed Aug 14, 2018
1 parent 0684068 commit 404594da57216e63b819eed1f566e38ca2a27827
Showing with 3 additions and 3 deletions.
  1. +3 −3 Core/Config.cpp
View
@@ -1211,10 +1211,10 @@ void Config::AddRecent(const std::string &file) {
return;
const std::string filename = File::ResolvePath(file);
for (auto str = recentIsos.begin(); str != recentIsos.end(); ++str) {
const std::string recent = File::ResolvePath(*str);
for (auto iter = recentIsos.begin(); iter != recentIsos.end(); ++iter) {
const std::string recent = File::ResolvePath(*iter);
if (filename == recent) {
recentIsos.erase(str);
iter = recentIsos.erase(iter);
// We'll add it back below.
}
}

0 comments on commit 404594d

Please sign in to comment.