Ticket #3178 (new enhancement)
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
Note: See
TracTickets for help on using
tickets.
