diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:57:50 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:57:50 +0000 |
commit | 5871718bb413ac072b3c2c4b4b88f7e328a18841 (patch) | |
tree | e65fe035fe07dcca9b952579f2444e0f7ce184dd | |
parent | c0a00c82853ac76283ea6a20c909a87cad5b4efb (diff) | |
download | apt-5871718bb413ac072b3c2c4b4b88f7e328a18841.tar.gz |
Fixed reinstreq segfault
Author: jgg
Date: 2001-05-07 02:15:33 GMT
Fixed reinstreq segfault
-rw-r--r-- | apt-pkg/algorithms.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index e1f9edb2..a2e93dd3 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.34 2001/04/06 05:40:03 jgg Exp $ +// $Id: algorithms.cc,v 1.35 2001/05/07 02:15:33 jgg Exp $ /* ###################################################################### Algorithms - A set of misc algorithms @@ -217,7 +217,7 @@ bool pkgApplyStatus(pkgDepCache &Cache) if (I->InstState == pkgCache::State::ReInstReq || I->InstState == pkgCache::State::HoldReInstReq) { - if (I.CurrentVer().Downloadable() == true) + if (I->CurrentVer != 0 && I.CurrentVer().Downloadable() == true) Cache.MarkKeep(I); else { @@ -238,7 +238,7 @@ bool pkgApplyStatus(pkgDepCache &Cache) re-unpacked (probably) */ case pkgCache::State::UnPacked: case pkgCache::State::HalfConfigured: - if (I.CurrentVer().Downloadable() == true || + if ((I->CurrentVer != 0 && I.CurrentVer().Downloadable() == true) || I.State() != pkgCache::PkgIterator::NeedsUnpack) Cache.MarkKeep(I); else |