aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Richard Brown <rbrown@exherbo.org> 2006-11-09 22:08:11 +0000
committerAvatar Richard Brown <rbrown@exherbo.org> 2006-11-09 22:08:11 +0000
commita49f4d4ac96843fa80b291e55d810b9e8d448023 (patch)
treed077cea876627fc6e9c2ee620ba5fc5ac11f3364
parent0fe1ea5250b65826ef26195c5e87c340f7798f67 (diff)
downloadpaludis-a49f4d4ac96843fa80b291e55d810b9e8d448023.tar.gz
paludis-a49f4d4ac96843fa80b291e55d810b9e8d448023.tar.xz
Fix segfault after paludis --query throws a SetNameError.
-rw-r--r--src/paludis/query.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/paludis/query.cc b/src/paludis/query.cc
index 97072b4..c786758 100644
--- a/src/paludis/query.cc
+++ b/src/paludis/query.cc
@@ -308,13 +308,14 @@ void do_one_query(
{
try
{
- if (0 == ((set = env->package_set(SetName(q)))))
- atom.assign(new PackageDepAtom(env->package_database()->fetch_unique_qualified_package_name(
- PackageNamePart(q))));
+ set = env->package_set(SetName(q));
}
catch (const SetNameError &)
{
}
+ if (0 == set)
+ atom.assign(new PackageDepAtom(env->package_database()->fetch_unique_qualified_package_name(
+ PackageNamePart(q))));
}
else
atom.assign(new PackageDepAtom(q));