Skip to content
Prev 2334 / 10988 Next

[Rcpp-devel] Rcpp::wrap seg fault (when called with a NULL pointer)

Hi,

yes, after thinking a little bit more I changed my code to:

   if(ret == NULL)
     return R_NilValue;
   else
     return Rcpp::wrap(ret);

and now everything works fine. But I'm still wondering whether it would make sense for Rcpp::wrap to return an R_NilValue when called with NULL (instead of seg-faulting..).

Regards,
Christoph
On 05/24/2011 01:46 PM, Dirk Eddelbuettel wrote: