From 7524e34882a4a2c21908da29218dd527e166406a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 19 Oct 2005 08:20:04 +0000 Subject: * fix a crash in apt-ftparchive --- ftparchive/writer.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ftparchive') diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index 0b68d0bbf..fc9ea27d7 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -581,8 +581,6 @@ bool SourcesWriter::DoPackage(string FileName) auto_ptr Itm(BOver.GetItem(BinList[I])); if (Itm.get() == 0) continue; - if (OverItem.get() == 0) - OverItem = Itm; unsigned char NewPrioV = debListParser::GetPrio(Itm->Priority); if (NewPrioV < BestPrioV || BestPrio.empty() == true) @@ -590,6 +588,9 @@ bool SourcesWriter::DoPackage(string FileName) BestPrioV = NewPrioV; BestPrio = Itm->Priority; } + + if (OverItem.get() == 0) + OverItem = Itm; } } -- cgit v1.2.3