From: CryptoManiac Date: Mon, 27 Dec 2021 08:18:59 +0000 (+0300) Subject: Deinit active branch first X-Git-Tag: nvc-v0.5.9~19 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=4770751e166e844914d22e8cc8f259c8f968d768 Deinit active branch first --- diff --git a/src/txdb-leveldb.cpp b/src/txdb-leveldb.cpp index f68c537..fb4b13f 100644 --- a/src/txdb-leveldb.cpp +++ b/src/txdb-leveldb.cpp @@ -95,10 +95,10 @@ CTxDB::CTxDB(const char* pszMode) printf("Required index version is %d, removing old database\n", DATABASE_VERSION); // Leveldb instance destruction - delete txdb; - txdb = pdb = NULL; delete activeBatch; activeBatch = NULL; + delete txdb; + txdb = pdb = NULL; init_blockindex(options, true); // Remove directory and create new database pdb = txdb;