Browse Source

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
tags/debian/2.1.3
Julian Andres Klode 4 months ago
parent
commit
e61886cacb
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      apt-private/private-search.cc

+ 1
- 1
apt-private/private-search.cc View File

@@ -42,7 +42,7 @@ static std::vector<pkgCache::DescIterator> const TranslatedDescriptionsList(pkgC
Descriptions.push_back(Desc);
}

if (Descriptions.empty())
if (Descriptions.empty() && V.TranslatedDescription().IsGood())
Descriptions.push_back(V.TranslatedDescription());

return Descriptions;


Loading…
Cancel
Save