mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
[test] Avoid potential NULL pointer dereference in addrman_tests.cpp
This commit is contained in:
parent
02e5308c1b
commit
afab9f47f6
@ -297,7 +297,7 @@ BOOST_AUTO_TEST_CASE(addrman_find)
|
||||
// Test 18; Find does not discriminate by port number.
|
||||
CAddrInfo* info2 = addrman.Find(addr2);
|
||||
BOOST_CHECK(info2);
|
||||
if (info2)
|
||||
if (info2 && info1)
|
||||
BOOST_CHECK(info2->ToString() == info1->ToString());
|
||||
|
||||
// Test 19: Find returns another IP matching what we searched on.
|
||||
|
Loading…
Reference in New Issue
Block a user