From 583489a17d9f256a211772977d3da898322b6477 Mon Sep 17 00:00:00 2001 From: Michael Sumner Date: Mon, 10 Jun 2024 08:15:58 +0000 Subject: [PATCH] valgrind destroy --- inst/include/gdalwarpgeneral/gdalwarpgeneral.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/inst/include/gdalwarpgeneral/gdalwarpgeneral.h b/inst/include/gdalwarpgeneral/gdalwarpgeneral.h index 3b35de1..a8e03dd 100644 --- a/inst/include/gdalwarpgeneral/gdalwarpgeneral.h +++ b/inst/include/gdalwarpgeneral/gdalwarpgeneral.h @@ -198,7 +198,7 @@ inline List gdal_warp_general(CharacterVector dsn, auto psOptions = GDALWarpAppOptionsNew(papszArg, nullptr); - CSLDestroy(papszArg); + GDALWarpAppOptionsSetProgress(psOptions, NULL, NULL ); GDALDatasetH hRet = GDALWarp(dsn_outname[0], nullptr, @@ -206,7 +206,9 @@ inline List gdal_warp_general(CharacterVector dsn, psOptions, nullptr); GDALWarpAppOptionsFree(psOptions); - + CSLDestroy(papszArg); + + CPLAssert( hRet != NULL ); for (int si = 0; si < dsn.size(); si++) { GDALClose( (GDALDataset *)poSrcDS[si] );