summaryrefslogtreecommitdiff
path: root/apt-private/private-search.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-private/private-search.cc')
-rw-r--r--apt-private/private-search.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/apt-private/private-search.cc b/apt-private/private-search.cc
index 0728b26c8..4f2bc4913 100644
--- a/apt-private/private-search.cc
+++ b/apt-private/private-search.cc
@@ -91,8 +91,11 @@ static bool FullTextSearch(CommandLine &CmdL) /*{{{*/
char const * const PkgName = P.Name();
pkgCache::DescIterator Desc = V.TranslatedDescription();
- pkgRecords::Parser &parser = records.Lookup(Desc.FileList());
- std::string const LongDesc = parser.LongDesc();
+ std::string LongDesc = "";
+ if (!Desc.end()) {
+ pkgRecords::Parser &parser = records.Lookup(Desc.FileList());
+ LongDesc = parser.LongDesc();
+ }
bool all_found = true;
for (std::vector<regex_t>::const_iterator pattern = Patterns.begin();