Protect from null ptr on chain tip

This commit is contained in:
Michael Toutonghi
2018-07-14 21:45:38 -07:00
parent 7756dac0c7
commit 37ad688668
4 changed files with 43 additions and 26 deletions

View File

@@ -11,6 +11,7 @@ using namespace std;
* CChain implementation
*/
void CChain::SetTip(CBlockIndex *pindex) {
lastTip = pindex;
if (pindex == NULL) {
vChain.clear();
return;