nix-perl: Fix segfault in queryPathInfo)

This commit is contained in:
Eelco Dolstra 2020-03-10 11:00:17 +01:00
parent d37dc71e3c
commit 5e086ba8c3
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -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)));