Patch a bug in is.subcladeof

This commit is contained in:
2018-02-20 06:47:00 +11:00
parent 2e45093e38
commit 9647b525af

View File

@@ -622,7 +622,12 @@ SEXP R_is_under_taxon(SEXP Rtaxonomy, SEXP Rtaxid, SEXP Rparent)
prep[i]=NA_LOGICAL;
else {
taxon = eco_findtaxonbytaxid(ptax, ptaxid[i]);
prep[i] = eco_isundertaxon(taxon, parent);
if (taxon) {
prep[i] = eco_isundertaxon(taxon, parent);
}
else {
prep[i]=NA_LOGICAL;
}
}
}
}