summaryrefslogtreecommitdiff
path: root/apt-private/private-list.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-private/private-list.cc')
-rw-r--r--apt-private/private-list.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-private/private-list.cc b/apt-private/private-list.cc
index a948c7d9f..32c8eeaa2 100644
--- a/apt-private/private-list.cc
+++ b/apt-private/private-list.cc
@@ -93,8 +93,8 @@ static void ListAllVersions(pkgCacheFile &CacheFile, pkgRecords &records,/*{{{*/
bool DoList(CommandLine &Cmd)
{
pkgCacheFile CacheFile;
- pkgCache *Cache = CacheFile.GetPkgCache();
- if (unlikely(Cache == NULL))
+ pkgCache * const Cache = CacheFile.GetPkgCache();
+ if (unlikely(Cache == nullptr || CacheFile.GetDepCache() == nullptr))
return false;
pkgRecords records(CacheFile);