* Don't crash when upgrading the Berkeley DB environment.
This commit is contained in:
parent
2a535689fe
commit
e4af398681
|
@ -30,7 +30,12 @@ class DestroyDbEnv
|
|||
DbEnv * dbenv;
|
||||
public:
|
||||
DestroyDbEnv(DbEnv * _dbenv) : dbenv(_dbenv) { }
|
||||
~DestroyDbEnv() { if (dbenv) { dbenv->close(0); delete dbenv; } }
|
||||
~DestroyDbEnv() {
|
||||
if (dbenv) {
|
||||
if (dbenv->get_DB_ENV()) dbenv->close(0);
|
||||
delete dbenv;
|
||||
}
|
||||
}
|
||||
void release() { dbenv = 0; };
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue