aboutsummaryrefslogtreecommitdiff
path: root/perl/lib/Nix/Store.xs
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-03-10 11:00:17 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-03-10 11:00:17 +0100
commit5e086ba8c39fc5c39cbbe452b33313c4e5782cd2 (patch)
treec2084b7cf2048b3d9d9e4d1dc3a0d81d19360dbe /perl/lib/Nix/Store.xs
parentd37dc71e3cf077fa5d24a9bf8395deae21cc4410 (diff)
nix-perl: Fix segfault in queryPathInfo)
Diffstat (limited to 'perl/lib/Nix/Store.xs')
-rw-r--r--perl/lib/Nix/Store.xs2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl/lib/Nix/Store.xs b/perl/lib/Nix/Store.xs
index fefcd5ae6..1ca734e75 100644
--- a/perl/lib/Nix/Store.xs
+++ b/perl/lib/Nix/Store.xs
@@ -102,7 +102,7 @@ SV * queryPathInfo(char * path, int base32)
PPCODE:
try {
auto info = store()->queryPathInfo(store()->parseStorePath(path));
- if (info->deriver)
+ if (!info->deriver)
XPUSHs(&PL_sv_undef);
else
XPUSHs(sv_2mortal(newSVpv(store()->printStorePath(*info->deriver).c_str(), 0)));