summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-get.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 62f712c39..cd450b27a 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1304,6 +1304,10 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
break;
fuzzy = true;
Ver = Pkg.VersionList();
+ // exit right away from the Pkg.VersionList() loop if we
+ // don't have any versions
+ if (Ver.end() == true)
+ break;
}
// We match against a concrete version (or a part of this version)
if (VerTag.empty() == false &&