File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -224,11 +224,11 @@ extern SEXP biomee_f_C(
224224
225225 // Dimensions
226226 int pDims [4 ] = {50 , nt_annual_trans , 35 , n_lu };
227- SEXP dims = allocVector (INTSXP , 4 );
227+ SEXP dims = PROTECT ( allocVector (INTSXP , 4 ) );
228228 // INTEGER(dims) is a int* which we initialise with pDims
229229 memcpy (INTEGER (dims ), pDims , 4 * sizeof (int ));
230230 // Allocate 4D array
231- SEXP output_annual_cohort_tile = PROTECT (allocArray (REALSXP , dims ));
231+ SEXP output_annual_cohort_tile = PROTECT ( allocArray (REALSXP , dims ) );
232232
233233 SEXP output_annual_aggregated = PROTECT ( allocMatrix (REALSXP , nt_annual , 71 ) );
234234 /****************/
@@ -263,7 +263,7 @@ extern SEXP biomee_f_C(
263263 SET_VECTOR_ELT (out_list , 2 , output_annual_cohort_tile );
264264 SET_VECTOR_ELT (out_list , 3 , output_annual_aggregated );
265265
266- UNPROTECT (5 );
266+ UNPROTECT (6 );
267267
268268 return out_list ;
269269}
You can’t perform that action at this time.
0 commit comments