diff options
Diffstat (limited to 'cmdline/apt-cache.cc')
-rw-r--r-- | cmdline/apt-cache.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 1493b63dc..2db251350 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -312,13 +312,14 @@ static void ShowHashTableStats(std::string Type, /* */ static bool Stats(CommandLine &CmdL) { - pkgCacheFile CacheFile; - pkgCache *Cache = CacheFile.GetPkgCache(); - if (CmdL.FileSize() > 1) { _error->Error(_("apt-cache stats does not take any arguments")); return false; } + + pkgCacheFile CacheFile; + pkgCache *Cache = CacheFile.GetPkgCache(); + if (unlikely(Cache == NULL)) return false; |