diff options
author | Michael Vogt <mvo@debian.org> | 2014-01-30 15:06:26 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-01-30 15:06:26 +0100 |
commit | 960975a175c2a21df749727162d5677cdc97a36e (patch) | |
tree | f96223470dcdb2b64628bb7bdf28e94034794cd8 | |
parent | 6ae22905f66064f46c0abf05d269e47869c664be (diff) |
do not crash if VF.File()/VF.File().Archive() is NULL
-rw-r--r-- | apt-private/private-output.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apt-private/private-output.cc b/apt-private/private-output.cc index a8bbad9e5..e9b8037da 100644 --- a/apt-private/private-output.cc +++ b/apt-private/private-output.cc @@ -68,8 +68,10 @@ std::string GetArchiveSuite(pkgCacheFile &CacheFile, pkgCache::VerIterator ver) pkgCache::VerFileIterator VF = ver.FileList(); for (; VF.end() == false ; ++VF) { - // XXX: how to figure out the relevant suite? if its in multiple ones? - suite = suite + "," + VF.File().Archive(); + if(VF.File() == NULL || VF.File().Archive() == NULL) + suite = suite + "," + _("unknown"); + else + suite = suite + "," + VF.File().Archive(); //suite = VF.File().Archive(); } suite = suite.erase(0, 1); |