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 )
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).
Note:
See TracTickets
for help on using tickets.