diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-16 04:46:10 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-16 04:46:10 +0100 |
commit | c8c86c776483a60b988b18257573009b9897fd6c (patch) | |
tree | d10540368debebd9158a0dc3dcca61d0218d71b8 /editor/scenery-editor.cpp | |
parent | b9e0fd9549b3211f0bcbf83a8cec646f42155100 (diff) |
editor: fix crash on deleting multiple scenery at once
Diffstat (limited to 'editor/scenery-editor.cpp')
-rw-r--r-- | editor/scenery-editor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/scenery-editor.cpp b/editor/scenery-editor.cpp index 40742c8a..32ddffa1 100644 --- a/editor/scenery-editor.cpp +++ b/editor/scenery-editor.cpp @@ -87,8 +87,9 @@ void scenery_editor::place_tile(world& w, global_coords pos, const scenery_& s, if (!s) { auto [c, t] = w[pos]; +start: const auto& es = c.objects(); -start: while (auto id = a.get_object_colliding_with_cursor()) + while (auto id = a.get_object_colliding_with_cursor()) { for (auto i = es.size()-1; i != (size_t)-1; i--) { |