mirror of
https://github.com/Unidata/netcdf-cxx4.git
synced 2024-11-21 03:13:46 +08:00
Do not call nc_close on null object in NcFile destructor
This commit is contained in:
parent
1d9f9eda36
commit
2f26ae3fc6
@ -17,6 +17,7 @@ NcFile::~NcFile()
|
||||
// causes undefined behaviour! so just printing a warning message
|
||||
try
|
||||
{
|
||||
if (!nullObject)
|
||||
ncCheck(nc_close(myId),__FILE__,__LINE__);
|
||||
}
|
||||
catch (NcException &e)
|
||||
|
Loading…
Reference in New Issue
Block a user