Skip to content

Commit

Permalink
Fix all #29358 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbi committed Feb 27, 2015
1 parent 16f5825 commit 82bb12e
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/worldmap/worldmap.cpp
Expand Up @@ -1034,16 +1034,25 @@ WorldMap::save_state()
store_bool(vm, "perfect", level->perfect);
level->statistics.serialize_to_squirrel(vm);

sq_newslot(vm, -3, SQFalse);
if(SQ_FAILED(sq_newslot(vm, -3, SQFalse)))
{
throw std::runtime_error("failed to create '" + name + "' table entry");
}
}

sq_newslot(vm, -3, SQFalse);
if(SQ_FAILED(sq_newslot(vm, -3, SQFalse)))
{
throw std::runtime_error("failed to create '" + name + "' table entry");
}

// overall statistics...
total_stats.serialize_to_squirrel(vm);

// push world into worlds table
sq_newslot(vm, -3, SQFalse);
if(SQ_FAILED(sq_newslot(vm, -3, SQFalse)))
{
throw std::runtime_error("failed to create '" + name + "' table entry");
}
} catch(std::exception& ) {
sq_settop(vm, oldtop);
}
Expand Down

0 comments on commit 82bb12e

Please sign in to comment.