Skip to content
Browse files

Check if db closed when destructor called

  • Loading branch information...
1 parent 425e26b commit 2c2cf528c9616a0f490935a91faf56b72704b386 @darashi darashi committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/nroonga.h
View
4 src/nroonga.h
@@ -41,7 +41,9 @@ class Database : ObjectWrap {
}
bool Cleanup();
~Database() {
- Cleanup();
+ if (!closed) {
+ assert(Cleanup());
+ }
}
static void CommandWork(uv_work_t* req);
static void CommandAfter(uv_work_t* req);

0 comments on commit 2c2cf52

Please sign in to comment.
Something went wrong with that request. Please try again.