mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 00:49:28 -05:00
fixed double call to sqlite3_close()
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7237 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e3c6816713
commit
679efe2ff3
@ -72,16 +72,14 @@ RetroDb::RetroDb(const std::string &dbPath, int flags, const std::string& key) :
|
||||
|
||||
RetroDb::~RetroDb(){
|
||||
|
||||
if(mDb)
|
||||
sqlite3_close(mDb);
|
||||
sqlite3_close(mDb); // no-op if mDb is NULL (https://www.sqlite.org/c3ref/close.html)
|
||||
mDb = NULL ;
|
||||
}
|
||||
|
||||
void RetroDb::closeDb(){
|
||||
|
||||
int rc;
|
||||
|
||||
if(mDb)
|
||||
rc = sqlite3_close(mDb);
|
||||
int rc= sqlite3_close(mDb);
|
||||
mDb = NULL ;
|
||||
|
||||
#ifdef RETRODB_DEBUG
|
||||
std::cerr << "RetroDb::closeDb(): Error code on close: " << rc << std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user