]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/debmetaindex.cc
Fix a segfault in the version merger introduced in the previous patch:
[apt.git] / apt-pkg / deb / debmetaindex.cc
index 8f28f053be887550eae6c64549ec11268b1cc718..520e94a807a0d80cb187ed0bab9bea062b2ca843 100644 (file)
@@ -181,6 +181,7 @@ bool debReleaseIndex::GetIndexes(pkgAcquire *Owner, bool GetAll) const
       for (vector<string>::const_iterator l = lang.begin();
                l != lang.end(); l++)
       {
       for (vector<string>::const_iterator l = lang.begin();
                l != lang.end(); l++)
       {
+       if (*l == "none") continue;
        debTranslationsIndex i = debTranslationsIndex(URI,Dist,(*I)->Section,(*l).c_str());
        i.GetIndexes(Owner);
       }
        debTranslationsIndex i = debTranslationsIndex(URI,Dist,(*I)->Section,(*l).c_str());
        i.GetIndexes(Owner);
       }
@@ -219,8 +220,10 @@ vector <pkgIndexFile *> *debReleaseIndex::GetIndexFiles()
          Indexes->push_back(new debPackagesIndex (URI, Dist, (*I)->Section, IsTrusted()));
 
         for (vector<string>::const_iterator l = lang.begin();
          Indexes->push_back(new debPackagesIndex (URI, Dist, (*I)->Section, IsTrusted()));
 
         for (vector<string>::const_iterator l = lang.begin();
-               l != lang.end(); l++)
+               l != lang.end(); l++) {
+           if (*l == "none") continue;
            Indexes->push_back(new debTranslationsIndex(URI,Dist,(*I)->Section,(*l).c_str()));
            Indexes->push_back(new debTranslationsIndex(URI,Dist,(*I)->Section,(*l).c_str()));
+        }
       }
    }
 
       }
    }