mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:24:13 +08:00
mdbx: minor fix assertion in the prev commit.
One more for https://github.com/erthink/libmdbx/issues/171. Change-Id: I49be3df948f3dbcc838f3dc307155ac404cfb331
This commit is contained in:
parent
f7cd08ea48
commit
439cccf65f
@ -6565,9 +6565,10 @@ static __inline int check_env(const MDBX_env *env, const bool wanna_active) {
|
||||
if (unlikely(env->me_flags & MDBX_FATAL_ERROR))
|
||||
return MDBX_PANIC;
|
||||
|
||||
if (wanna_active && unlikely((env->me_flags & MDBX_ENV_ACTIVE) == 0)) {
|
||||
if (wanna_active) {
|
||||
if (unlikely((env->me_flags & MDBX_ENV_ACTIVE) == 0))
|
||||
return MDBX_EPERM;
|
||||
mdbx_assert(env, env->me_map != nullptr);
|
||||
return MDBX_EPERM;
|
||||
}
|
||||
|
||||
return MDBX_SUCCESS;
|
||||
|
Loading…
x
Reference in New Issue
Block a user