From b65f63d0030ba04868f179d5b18589cfff1015da Mon Sep 17 00:00:00 2001 From: pixel Date: Sat, 29 Nov 2003 02:04:04 +0000 Subject: Cosmetic --- lib/BLua.cc | 1 - lib/Handle.cc | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/BLua.cc b/lib/BLua.cc index 7ee0bc4..6c40cc3 100644 --- a/lib/BLua.cc +++ b/lib/BLua.cc @@ -476,7 +476,6 @@ int LuaStatics::destructor(lua_State * _L) { return 0; } - void LuaObject::pushdestruct(Lua * L) throw (GeneralException) { if (pushed) { throw GeneralException("Error: can't push destructor, object already pushed"); diff --git a/lib/Handle.cc b/lib/Handle.cc index 84004b0..ca2c971 100644 --- a/lib/Handle.cc +++ b/lib/Handle.cc @@ -246,10 +246,12 @@ void Handle::close() throw (GeneralException) { } } } else { - int err = ::close(h); - if (err) { - throw GeneralException(String(_("Error during close: ")) + strerror(errno)); - } + if (!hFile) { + int err = ::close(h); + if (err) { + throw GeneralException(String(_("Error during close: ")) + strerror(errno)); + } + } } } -- cgit v1.2.3