summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/indexrecords.cc5
1 files changed, 4 insertions, 1 deletions
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