]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/indexrecords.cc
* apt-pkg/contrib/fileutl.cc:
[apt.git] / apt-pkg / indexrecords.cc
index cdb9250e821f9567d88bc3e5476f40629c06f072..af2639beb851cfb125bf84b072c9aab2109e4daf 100644 (file)
@@ -44,7 +44,10 @@ time_t indexRecords::GetValidUntil() const
 
 const indexRecords::checkSum *indexRecords::Lookup(const string MetaKey)
 {
-   return Entries[MetaKey];
+   std::map<std::string, indexRecords::checkSum* >::const_iterator sum = Entries.find(MetaKey);
+   if (sum == Entries.end())
+      return NULL;
+   return sum->second;
 }
 
 bool indexRecords::Exists(string const &MetaKey) const