diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-04-08 20:57:01 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-04-08 20:57:01 +0200 |
commit | 259f688a29728604d7930662e9743619982706ab (patch) | |
tree | 0e1ba40964ce444e8fed8edcf3caf87204eaca4d /cmdline/apt-get.cc | |
parent | 22326578d84ee9df4b192dd5ba5120098afe97ea (diff) |
* cmdline/apt-get.cc:
- fix crash when pkg.VersionList() is empty
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r-- | cmdline/apt-get.cc | 4 |
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 && |