summaryrefslogtreecommitdiff
path: root/apt-private/private-depends.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-private/private-depends.cc')
-rw-r--r--apt-private/private-depends.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-private/private-depends.cc b/apt-private/private-depends.cc
index 955f3dc67..3a3a2737a 100644
--- a/apt-private/private-depends.cc
+++ b/apt-private/private-depends.cc
@@ -26,8 +26,8 @@
static bool ShowDepends(CommandLine &CmdL, bool const RevDepends)
{
pkgCacheFile CacheFile;
- pkgCache *Cache = CacheFile.GetPkgCache();
- if (unlikely(Cache == NULL))
+ pkgCache * const Cache = CacheFile.GetPkgCache();
+ if (unlikely(Cache == nullptr || CacheFile.GetDepCache() == nullptr))
return false;
CacheSetHelperVirtuals helper(false);