message: [Core] Guard against a segfault in serialization
diff: @@ -3992,7 +3992,9 @@ bool ActivateBestChain(CValidationState& state, CBlock* pblock, bool fAlreadyChe
  uiInterface.NotifyBlockTip(hashNewTip);
  GetMainSignals().UpdatedBlockTip(pindexNewTip);
  - unsigned size = GetSerializeSize(*pblock, SER_NETWORK, PROTOCOL_VERSION);
  + unsigned size = 0;
  + if (pblock)
  + size = GetSerializeSize(*pblock, SER_NETWORK, PROTOCOL_VERSION);
  // If the size is over 1 MB notify external listeners, and it is within the last 5 minutes
  if (size > MAX_BLOCK_SIZE_LEGACY && pblock->GetBlockTime() > GetAdjustedTime() - 300) {
  uiInterface.NotifyBlockSize(static_cast<int>(size), hashNewTip);
  