From: Michael Vogt Date: Thu, 30 Jan 2014 14:06:26 +0000 (+0100) Subject: do not crash if VF.File()/VF.File().Archive() is NULL X-Git-Tag: 0.9.15.1ubuntu1~2^2 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/960975a175c2a21df749727162d5677cdc97a36e?ds=sidebyside do not crash if VF.File()/VF.File().Archive() is NULL --- 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);