Avoid accessing invalid index -1 if OUString queryStr is empty. It cannot be guaranteed that callers will always pass a non-empty value for queryStr. Change-Id: I759a4caea5d52371467f58bb5b95edbd3ff7d4d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181850 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins