Skip to content

Commit

Permalink
FlipLevelTransformer: Do not flip invalid (removed) objects
Browse files Browse the repository at this point in the history
Fixes #3076.
  • Loading branch information
Vankata453 committed Oct 11, 2024
1 parent 4dd3fee commit 8670ba2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/supertux/flip_level_transformer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ FlipLevelTransformer::transform_sector(Sector& sector)
{
float height = sector.get_height();

for (auto& object : sector.get_objects()) {
for (auto& object : sector.get_objects())
{
if (!object->is_valid())
return;

object->on_flip(height);
}

Expand Down

0 comments on commit 8670ba2

Please sign in to comment.