diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:58:02 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:58:02 +0000 |
commit | e481d5b040afd0c4efccfd6c660b0c9682483bf0 (patch) | |
tree | 7594adb6a4ba6fd831d9c0858008abbdb644c43a /apt-pkg/algorithms.cc | |
parent | 8d9850a1854fb081d4ae571c25322ececd77145a (diff) |
Fixed possible seg fault if there are no versions
Author: jgg
Date: 2001-05-27 03:46:10 GMT
Fixed possible seg fault if there are no versions
Diffstat (limited to 'apt-pkg/algorithms.cc')
-rw-r--r-- | apt-pkg/algorithms.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index a2e93dd3b..322c667f2 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: algorithms.cc,v 1.35 2001/05/07 02:15:33 jgg Exp $ +// $Id: algorithms.cc,v 1.36 2001/05/27 03:46:10 jgg Exp $ /* ###################################################################### Algorithms - A set of misc algorithms @@ -213,6 +213,9 @@ bool pkgApplyStatus(pkgDepCache &Cache) { for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) { + if (I->VersionList == 0) + continue; + // Only choice for a ReInstReq package is to reinstall if (I->InstState == pkgCache::State::ReInstReq || I->InstState == pkgCache::State::HoldReInstReq) |