Skip to content

Commit

Permalink
dangling new
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsumner committed Jun 6, 2024
1 parent 0f29436 commit 9e14980
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions inst/include/gdalwarpgeneral/gdalwarpgeneral.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,9 @@ inline List gdal_warp_general(CharacterVector dsn,
}

if (!target_crs[0].empty()) {
OGRSpatialReference *oTargetSRS = nullptr;
oTargetSRS = new OGRSpatialReference;
const char * strforuin = (const char *)target_crs[0];
OGRErr target_chk = oTargetSRS->SetFromUserInput(strforuin);
OGRSpatialReference oTargetSRS;
//const char * strforuin = (const char *)target_crs[0];
OGRErr target_chk = oTargetSRS.SetFromUserInput(target_crs[0]);
if (target_chk != OGRERR_NONE) Rcpp::stop("cannot initialize target projection");
const char *st = NULL;
st = ((GDALDataset *)poSrcDS[0])->GetProjectionRef();
Expand Down

0 comments on commit 9e14980

Please sign in to comment.