X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/89d88ac3ef3f82fdfeac6d8d231deddeeb0f02e9..cb6a2b3eaca4353d7f490fb360b98c08d64a2d8c:/apt-pkg/indexrecords.cc

diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc
index cdb9250e8..af2639beb 100644
--- a/apt-pkg/indexrecords.cc
+++ b/apt-pkg/indexrecords.cc
@@ -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