aboutsummaryrefslogtreecommitdiff
path: root/src/test/dbwrapper_tests.cpp
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2017-03-18 12:40:58 +0100
committerpracticalswift <practicalswift@users.noreply.github.com>2017-03-18 12:40:58 +0100
commitd93b97fbcfdd5cd255a456ee4d8d6d8020103862 (patch)
treeb7c49cfef9a89de6316c0e2e38967378e5106d31 /src/test/dbwrapper_tests.cpp
parentfcf556f7e9b3b09d88aaa1377dc97f6438b2c9c6 (diff)
Set to nullptr after delete
Diffstat (limited to 'src/test/dbwrapper_tests.cpp')
-rw-r--r--src/test/dbwrapper_tests.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/dbwrapper_tests.cpp b/src/test/dbwrapper_tests.cpp
index 22c90bd95b..9d55beb8ea 100644
--- a/src/test/dbwrapper_tests.cpp
+++ b/src/test/dbwrapper_tests.cpp
@@ -141,6 +141,7 @@ BOOST_AUTO_TEST_CASE(existing_data_no_obfuscate)
// Call the destructor to free leveldb LOCK
delete dbw;
+ dbw = nullptr;
// Now, set up another wrapper that wants to obfuscate the same directory
CDBWrapper odbw(ph, (1 << 10), false, false, true);
@@ -182,6 +183,7 @@ BOOST_AUTO_TEST_CASE(existing_data_reindex)
// Call the destructor to free leveldb LOCK
delete dbw;
+ dbw = nullptr;
// Simulate a -reindex by wiping the existing data store
CDBWrapper odbw(ph, (1 << 10), false, true, true);