summaryrefslogtreecommitdiff
path: root/apt-private/private-update.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-private/private-update.cc')
-rw-r--r--apt-private/private-update.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-private/private-update.cc b/apt-private/private-update.cc
index 73a82e988..1323771f0 100644
--- a/apt-private/private-update.cc
+++ b/apt-private/private-update.cc
@@ -84,7 +84,8 @@ bool DoUpdate(CommandLine &CmdL)
if (_config->FindB("APT::Cmd::Show-Update-Stats", false) == true)
{
int upgradable = 0;
- Cache.Open();
+ if (Cache.Open() == false)
+ return false;
for (pkgCache::PkgIterator I = Cache->PkgBegin(); I.end() != true; ++I)
{
pkgDepCache::StateCache &state = Cache[I];