Skip to content

Commit

Permalink
check for null snowflake
Browse files Browse the repository at this point in the history
  • Loading branch information
braindigitalis committed Jun 17, 2024
1 parent 9464b5e commit 01c67ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/game_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,10 @@ void player::drop_everything() {

bool player::save(dpp::snowflake user_id, bool put_backup)
{
if (user_id.empty()) {
std::cout << "EMPTY snowflake on user " << this->name << "\n";
return false;
}
tick_mana();
db::transaction();

Expand Down

0 comments on commit 01c67ad

Please sign in to comment.