Opened 15 years ago

Last modified 9 years ago

#3178 closed enhancement

GDALDestroyWarpOptions to do nothing for null — at Version 1

Reported by: Mateusz Łoskot Owned by: warmerdam
Priority: normal Milestone: 2.0.0
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords:
Cc:

Description (last modified by Mateusz Łoskot)

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 (1)

comment:1 by Mateusz Łoskot, 15 years ago

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