diff options
author | pixel <pixel> | 2003-11-29 02:04:04 +0000 |
---|---|---|
committer | pixel <pixel> | 2003-11-29 02:04:04 +0000 |
commit | b65f63d0030ba04868f179d5b18589cfff1015da (patch) | |
tree | c3e184b2f8026d99b926ce6c4ca619a6da7557c0 /lib | |
parent | b60005df986a901ed2b91a96529a7f7d6937ce52 (diff) |
Cosmetic
Diffstat (limited to 'lib')
-rw-r--r-- | lib/BLua.cc | 1 | ||||
-rw-r--r-- | 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)); + } + } } } |