diff options
-rw-r--r-- | apt-private/private-cacheset.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-private/private-cacheset.cc b/apt-private/private-cacheset.cc index 2d85aaf4f..1b2834ea1 100644 --- a/apt-private/private-cacheset.cc +++ b/apt-private/private-cacheset.cc @@ -436,7 +436,8 @@ APT::VersionSet CacheSetHelperAPTGet::tryVirtualPackage(pkgCacheFile &Cache, pkg { case RELEASE: for (auto File = V.FileList(); not File.end(); ++File) - if (lastmatcher == File.File().Archive() || lastmatcher == File.File().Codename()) + if ((File.File().Archive() != nullptr && lastmatcher == File.File().Archive()) || + (File.File().Codename() != nullptr && lastmatcher == File.File().Codename())) { verset.push_back(V); break; |