From e61886cacbc5411ea027e3a3d1d5c31793ed2b71 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 14 May 2020 00:06:56 +0200 Subject: private-search: Only use V.TranslatedDescription() if good When we could not find a translated description, we were pushing V.TranslatedDescription() to the vector, but that one might not have been good either. Add the check so we don't crash later when trying to access it. LP: #1877987 --- apt-private/private-search.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-private') diff --git a/apt-private/private-search.cc b/apt-private/private-search.cc index b3f9469ac..b2114740e 100644 --- a/apt-private/private-search.cc +++ b/apt-private/private-search.cc @@ -42,7 +42,7 @@ static std::vector const TranslatedDescriptionsList(pkgC Descriptions.push_back(Desc); } - if (Descriptions.empty()) + if (Descriptions.empty() && V.TranslatedDescription().IsGood()) Descriptions.push_back(V.TranslatedDescription()); return Descriptions; -- cgit v1.2.3