~widelands-dev/widelands/trunk

« back to all changes in this revision

Viewing changes to src/logic/map_objects/tribes/ship.cc

  • Committer: The Widelands Bunnybot
  • Date: 2025-05-29 07:12:34 UTC
  • Revision ID: bunnybot@widelands.org-20250529071234-4ga6a94k3f021wux
fix assertion thrown by ship expedition (CB #5093 / GH #6733)

Co-authored-by: Simon Heimberg <simon.heimberg@heimberg-ea.ch>
Co-authored-by: Widelands Bunnybot <bunnybot@widelands.org>

(by bunnybot)
3aa67dcc254eeb83915ccdff1520f1ad82cb4000

Show diffs side-by-side

added added

removed removed

Lines of Context:
2374
2374
        // Bring us back into a fleet and a economy.
2375
2375
        set_economy(game, nullptr, wwWARE);
2376
2376
        set_economy(game, nullptr, wwWORKER);
 
2377
        destination_object_ = nullptr;  // remove potential destination, ...
 
2378
        destination_coords_ = nullptr;  // ... for assert in ShippingSchedule::ship_added()
 
2379
 
2377
2380
        init_fleet(game);
2378
2381
        if ((get_fleet() == nullptr) || !get_fleet()->has_ports()) {
2379
2382
                // We lost our last reachable port, so we reset the expedition's state