aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2007-11-13 21:28:40 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2007-11-13 21:28:40 +0000
commita4c612707f13c41d94a15e62adb64ab75b03a988 (patch)
tree4f9d3c8358819fffc353e0922d42a3b5101f2801
parent95105e0c87bf58803d559738a3fe201b457a0af1 (diff)
downloadpaludis-a4c612707f13c41d94a15e62adb64ab75b03a988.tar.gz
paludis-a4c612707f13c41d94a15e62adb64ab75b03a988.tar.xz
Don't segfault if we're given the wrong kind of PackageID.
-rw-r--r--paludis/repositories/e/vdb_repository.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 9e7b29c..caa598a 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -257,6 +257,9 @@ VDBRepository::query_use(const UseFlagName & f, const PackageID & e) const
{
Lock l(*_imp->big_nasty_mutex);
+ if (this != e.repository().get())
+ return use_unspecified;
+
if (! static_cast<const VDBID *>(&e)->use_key())
return use_unspecified;