diff options
author | Christopher Faylor <me@cgf.cx> | 2006-08-11 00:25:54 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-08-11 00:25:54 +0400 |
commit | 1767b8d02834dfbd10c2857f1035c22148856d75 (patch) | |
tree | 3a481e3694a7d36e2d6347d32f82e3028cacc75a /winsup/cygwin/pinfo.cc | |
parent | 2f98d8bdc7a9615d7d473cd808e7482c62bd9e41 (diff) |
* pinfo.cc (_onreturn::~onreturn): Don't attempt to close a NULL handle.
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r-- | winsup/cygwin/pinfo.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 9440943d8..d73ad20aa 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -1097,10 +1097,11 @@ class _onreturn public: ~_onreturn () { - if (h) + if (h && *h) { CloseHandle (*h); *h = NULL; + h = NULL; } } void no_close_p_handle () {h = NULL;} |