Fix index out of bounds with dialog accept_types description (fixes #3779)

This commit is contained in:
Jacobo Aragunde Pérez 2024-09-16 09:08:22 +00:00 committed by Marshall Greenblatt
parent b90f0048da
commit 6459917c0a
1 changed files with 3 additions and 1 deletions

View File

@ -515,7 +515,9 @@ CefFileDialogManager::MaybeRunDelegate(
ext_str += FilePathTypeToString16(FILE_PATH_LITERAL(".") + ext); ext_str += FilePathTypeToString16(FILE_PATH_LITERAL(".") + ext);
} }
accept_extensions.push_back(ext_str); accept_extensions.push_back(ext_str);
accept_descriptions.push_back(descriptions[i]); if (descriptions.size() == extensions.size()) {
accept_descriptions.push_back(descriptions[i]);
}
} }
} }