[multi-profile]Speculative fix for crash while loading AppList search

Either we are attempting to emplace() past the last element of the
vector, or the index is negative somehow. Fix the first condition and
check for the second.

Bug: 992344
Change-Id: Id3f6a71a9d5ab3ad41079f9ed1fa7067238faae8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1761295
Commit-Queue: Alex Newcomer <[email protected]>
Reviewed-by: Matthew Mourgos <[email protected]>
Cr-Commit-Position: refs/heads/master@{#688279}
1 file changed