Skip to content

Commit

Permalink
Check if db is already closed in destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
2shady4u committed Feb 27, 2024
1 parent 79e843b commit 62dcf26
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gdsqlite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ SQLite::~SQLite()
/* Clean up the function_registry */
function_registry.clear();
function_registry.shrink_to_fit();
close_db();
/* Close the database connection if it is still open */
if (db) {
close_db();
}
}

bool SQLite::open_db()
Expand Down

0 comments on commit 62dcf26

Please sign in to comment.