From 6ea086805714e0dbeecfb5e3e26d3489a624bcd4 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 11 Aug 2006 17:27:13 +0200 Subject: * apt-pkg/depcache.cc: - only work on instVer if we actually have one --- apt-pkg/depcache.cc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index bfcb8e0eb..b5b96dbcf 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -680,14 +680,15 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, { bool found=false; VerIterator instVer = Pkg.CurrentVer(); - for (DepIterator D = instVer.DependsList(); D.end() != true; D++) - { - //FIXME: deal better with or-groups(?) - DepIterator LocalStart = D; - - if(IsImportantDep(D) && Start.TargetPkg() == D.TargetPkg()) - found=true; - } + if(!instVer.end()) + for (DepIterator D = instVer.DependsList(); D.end() != true; D++) + { + //FIXME: deal better with or-groups(?) + DepIterator LocalStart = D; + + if(IsImportantDep(D) && Start.TargetPkg() == D.TargetPkg()) + found=true; + } // this is a new dep if it was not found to be already // a important dep of the installed pacakge isNewImportantDep = !found; -- cgit v1.2.3