]> git.saurik.com Git - apt.git/blobdiff - apt-private/private-cacheset.h
prepare cachesets for -std=c++11
[apt.git] / apt-private / private-cacheset.h
index 059c7637ef4613c176f9486b5927af97dbe4aaa9..0eb22b78822c3a06047a2a8a441ea161307e8270 100644 (file)
@@ -32,10 +32,15 @@ struct VersionSortDescriptionLocality
    bool operator () (const pkgCache::VerIterator &v_lhs, 
                      const pkgCache::VerIterator &v_rhs)
     {
-        pkgCache::DescFile *A = v_lhs.TranslatedDescription().FileList();
-        pkgCache::DescFile *B = v_rhs.TranslatedDescription().FileList();
-        if (A == 0 && B == 0)
-           return false;
+       pkgCache::DescFile const *A = NULL;
+       pkgCache::DescFile const *B = NULL;
+       if (v_lhs->DescriptionList != 0)
+         A = v_lhs.TranslatedDescription().FileList();
+       if (v_rhs->DescriptionList != 0)
+         B = v_rhs.TranslatedDescription().FileList();
+
+       if (A == 0 && B == 0)
+         return false;
 
        if (A == 0)
           return true;