Fix FindConfig in cros_component_installed_chromeos
The CL fixes FindConfig implementation to return nullptr for unknown components. FindConfig used std::find_if to find a matching component config. For non-existing elements, find_if returns the last iterator (in this case std::end(kConfigs)), which is invalid, but non-null. BUG=None Change-Id: I53ff08d43131d4f8bfd02c8e02347de095ed6094 Reviewed-on: https://chromium-review.googlesource.com/1164581Reviewed-by:Joshua Pawlicki <waffles@chromium.org> Commit-Queue: Toni Barzic <tbarzic@chromium.org> Cr-Commit-Position: refs/heads/master@{#581262}
Showing
Please register or sign in to comment