wesnoth/changelog_entries/editor_ability_assert.md
Steve Cotton 42baec931c Fix crash in scenario editor when placing units
The previous bugfix fixed a crash when loading savegames with units whose
abilities accessed the map while the display_context was still being
constructed, however it reintroduced a bug in the scenario editor. Using the
unit tool always crashed when adding any unit.

This commit uses 4d1fc268b1's code path whenever possible, however it falls
back to 6a21fdc675's code path when 4d1fc268b1 would assert. In practise one
path is used in game and the other is used in the scenario editor, but doing
the logic in this way ensures that any edge cases are going to affect the
scenario editor rather than the game itself.

Cherry picked from commit 1485cfd6256b73bb06aa34c512c2890749b45487,
with conflicts because code from attack_type::weapon_specials() has
moved to attack_type::weapon_specials_impl_adj().
2023-01-23 00:04:33 +01:00

81 B

Editor

  • Fixed: the unit tool crashes when placing a unit (issue #7296).