game: fix crash when daemon is down at a bad time

This commit is contained in:
Crypto City 2023-03-17 17:00:20 +00:00
parent 4e6958c42a
commit b54d553d08

View File

@ -276,7 +276,8 @@ void GameState::update(const std::shared_ptr<GameWallet> &wallet, uint64_t top_h
uint64_t prev_top_height = this->top_height;
this->top_height = top_height;
this->top_hash = top_hash;
this->hf_version = w->get_current_hard_fork();
try { this->hf_version = w->get_current_hard_fork(); }
catch(...) {}
playerState.update(wallet);
if (w)