- addRepo(): don't add repo condition if alias is empty
authorJan Kupec <jkupec@suse.cz>
Mon, 28 Jul 2008 13:47:12 +0000 (13:47 +0000)
committerJan Kupec <jkupec@suse.cz>
Mon, 28 Jul 2008 13:47:12 +0000 (13:47 +0000)
zypp/PoolQuery.cc

index 0b7622d..003bfa6 100644 (file)
@@ -774,6 +774,11 @@ attremptycheckend:
 
   void PoolQuery::addRepo(const std::string &repoalias)
   {
+    if (repoalias.empty())
+    {
+      WAR << "ignoring an empty repository alias" << endl;
+      return;
+    }
     _pimpl->_repos.insert(repoalias);
     _pimpl->_flags &= ~SEARCH_ALL_REPOS;
   }