diff --git a/src/common/classes/PublicHandle.cpp b/src/common/classes/PublicHandle.cpp index bae42fa3da..1ffa2627c8 100644 --- a/src/common/classes/PublicHandle.cpp +++ b/src/common/classes/PublicHandle.cpp @@ -65,11 +65,6 @@ namespace Firebird ExistenceMutex* PublicHandle::isKnownHandle() const { - if (!this) - { - return NULL; - } - ReadLockGuard guard(sync); if (handles->exist(this)) { diff --git a/src/jrd/Database.h b/src/jrd/Database.h index 48010ae665..7d19b1e6e2 100644 --- a/src/jrd/Database.h +++ b/src/jrd/Database.h @@ -380,10 +380,9 @@ public: bool checkHandle() const { - if (!isKnownHandle()) - { + if (!this || !isKnownHandle()) return false; - } + mutex()->release(); return TypedHandle::checkHandle();