Ticket #3178 (new enhancement)

Opened 4 years ago

Last modified 4 years ago

GDALDestroyWarpOptions to do nothing for null

Reported by: mloskot Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords:
Cc:

Description (last modified by mloskot) (diff)

GDALDestroyWarpOptions function should follow behaviour of std::free function and other standard C/C++ deallocators and should do nothing if nullptr is passed.

Currently, it throws error if psOptions is nullptr.

The change is trivial:

void CPL_STDCALL GDALDestroyWarpOptions( GDALWarpOptions *psOptions )
{
   if (psOptions)
   {
      // current definition
   }
}

Actually, this should apply to all GDAL/OGR deallocators (Destroy and Close functions).

Change History

Changed 4 years ago by mloskot

  • description modified (diff)
Note: See TracTickets for help on using tickets.