Fix attempting to erase end() in the boost unit tests.
In that test current_addon_ is "", so when run locally with add-ons installed it results in it attempting to erase dirs_.end().
This commit is contained in:
parent
987827b475
commit
0c0f9ba997
1 changed files with 1 additions and 1 deletions
|
@ -123,7 +123,7 @@ void editor_edit_pbl::pre_show(window& win)
|
|||
multimenu_button& dependencies = find_widget<multimenu_button>(&win, "dependencies", false);
|
||||
std::vector<config> addons_list;
|
||||
filesystem::get_files_in_dir(filesystem::get_addons_dir(), nullptr, &dirs_, filesystem::name_mode::FILE_NAME_ONLY);
|
||||
if(dirs_.size() > 0) {
|
||||
if(dirs_.size() > 0 && std::find(dirs_.begin(), dirs_.end(), current_addon_) != dirs_.end()) {
|
||||
dirs_.erase(std::remove(dirs_.begin(), dirs_.end(), current_addon_));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue