diff --git a/src/chainparams.h b/src/chainparams.h index ffeb1f30a2..bbb25090ad 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -25,6 +25,9 @@ struct CCheckpointData { MapCheckpoints mapCheckpoints; int GetHeight() const { + if(mapCheckpoints.empty()) + return 0; + const auto& final_checkpoint = mapCheckpoints.rbegin(); return final_checkpoint->first /* height */; }