Generally the changes look good (beside of the already elsewhere mentioned copyright year in the header :) ).
However I tested the change with all my savegames and quite some savegames failed to load. I even got a segfault:
Reading Building Data ...
Program received signal SIGSEGV, Segmentation fault.
0x087401f4 in Widelands::Player::tribe (this=0x0) at /home/drehatlas/widelands/widelands/src/logic/player.h:116
116 const Tribe_Descr & tribe() const throw () {return m_tribe;}
(gdb) bt
#0 0x087401f4 in Widelands::Player::tribe (this=0x0) at /home/drehatlas/widelands/widelands/src/logic/player.h:116
#1 0x0890fb1a in Widelands::DismantleSite::DismantleSite (this=0xb362150, gdescr=..., egbase=..., c=..., plr=..., loading=true,
former_buildings=std::vector of length 1, capacity 1 = {...}) at /home/drehatlas/widelands/widelands/src/logic/dismantlesite.cc:77
#2 0x089084cf in Widelands::Editor_Game_Base::warp_dismantlesite (this=0xbfffc3a4, c=..., owner=1 '\001', loading=true,
former_buildings=std::vector of length 1, capacity 1 = {...}) at /home/drehatlas/widelands/widelands/src/logic/editor_game_base.cc:349
#3 0x08a2945b in Widelands::Map_Building_Data_Packet::Read (this=0xbfffc0dc, fs=..., egbase=..., skip=false, mol=...)
at /home/drehatlas/widelands/widelands/src/map_io/widelands_map_building_data_packet.cc:91
#4 0x08a1e7a0 in Widelands::WL_Map_Loader::load_map_complete (this=0x956f888, egbase=..., scenario=true)
at /home/drehatlas/widelands/widelands/src/map_io/widelands_map_loader.cc:246
#5 0x08a739a7 in Widelands::Game_Map_Data_Packet::Read_Complete (this=0xbfffc218, game=...) at /home/drehatlas/widelands/widelands/src/game_io/game_map_data_packet.cc:56
#6 0x087ee732 in Widelands::Game_Loader::load_game (this=0xbfffc340, multiplayer=false) at /home/drehatlas/widelands/widelands/src/game_io/game_loader.cc:82
#7 0x0892dc13 in Widelands::Game::run_load_game (this=0xbfffc3a4, filename="save/Katy.wgf") at /home/drehatlas/widelands/widelands/src/logic/game.cc:415
#8 0x086e6cf6 in WLApplication::load_game (this=0x920a838) at /home/drehatlas/widelands/widelands/src/wlapplication.cc:2063
#9 0x086e5fd9 in WLApplication::mainmenu_singleplayer (this=0x920a838) at /home/drehatlas/widelands/widelands/src/wlapplication.cc:1650
#10 0x086e5b94 in WLApplication::mainmenu (this=0x920a838) at /home/drehatlas/widelands/widelands/src/wlapplication.cc:1567
#11 0x086e11b2 in WLApplication::run (this=0x920a838) at /home/drehatlas/widelands/widelands/src/wlapplication.cc:469
#12 0x086df695 in main (argc=1, argv=0xbfffed64) at /home/drehatlas/widelands/widelands/src/main.cc:103
I will send you the savegame I triggered this crash with per mail
Generally the changes look good (beside of the already elsewhere mentioned copyright year in the header :) ).
However I tested the change with all my savegames and quite some savegames failed to load. I even got a segfault:
Reading Building Data ... :Player: :tribe (this=0x0) at /home/drehatlas /widelands/ widelands/ src/logic/ player. h:116 :Player: :tribe (this=0x0) at /home/drehatlas /widelands/ widelands/ src/logic/ player. h:116 :DismantleSite: :DismantleSite (this=0xb362150, gdescr=..., egbase=..., c=..., plr=..., loading=true, buildings= std::vector of length 1, capacity 1 = {...}) at /home/drehatlas /widelands/ widelands/ src/logic/ dismantlesite. cc:77 :Editor_ Game_Base: :warp_dismantle site (this=0xbfffc3a4, c=..., owner=1 '\001', loading=true, buildings= std::vector of length 1, capacity 1 = {...}) at /home/drehatlas /widelands/ widelands/ src/logic/ editor_ game_base. cc:349 :Map_Building_ Data_Packet: :Read (this=0xbfffc0dc, fs=..., egbase=..., skip=false, mol=...) /widelands/ widelands/ src/map_ io/widelands_ map_building_ data_packet. cc:91 :WL_Map_ Loader: :load_map_ complete (this=0x956f888, egbase=..., scenario=true) /widelands/ widelands/ src/map_ io/widelands_ map_loader. cc:246 :Game_Map_ Data_Packet: :Read_Complete (this=0xbfffc218, game=...) at /home/drehatlas /widelands/ widelands/ src/game_ io/game_ map_data_ packet. cc:56 :Game_Loader: :load_game (this=0xbfffc340, multiplayer=false) at /home/drehatlas /widelands/ widelands/ src/game_ io/game_ loader. cc:82 :Game:: run_load_ game (this=0xbfffc3a4, filename= "save/Katy. wgf") at /home/drehatlas /widelands/ widelands/ src/logic/ game.cc: 415 :load_game (this=0x920a838) at /home/drehatlas /widelands/ widelands/ src/wlapplicati on.cc:2063 :mainmenu_ singleplayer (this=0x920a838) at /home/drehatlas /widelands/ widelands/ src/wlapplicati on.cc:1650 :mainmenu (this=0x920a838) at /home/drehatlas /widelands/ widelands/ src/wlapplicati on.cc:1567 /widelands/ widelands/ src/wlapplicati on.cc:469 /widelands/ widelands/ src/main. cc:103
Program received signal SIGSEGV, Segmentation fault.
0x087401f4 in Widelands:
116 const Tribe_Descr & tribe() const throw () {return m_tribe;}
(gdb) bt
#0 0x087401f4 in Widelands:
#1 0x0890fb1a in Widelands:
former_
#2 0x089084cf in Widelands:
former_
#3 0x08a2945b in Widelands:
at /home/drehatlas
#4 0x08a1e7a0 in Widelands:
at /home/drehatlas
#5 0x08a739a7 in Widelands:
#6 0x087ee732 in Widelands:
#7 0x0892dc13 in Widelands:
#8 0x086e6cf6 in WLApplication:
#9 0x086e5fd9 in WLApplication:
#10 0x086e5b94 in WLApplication:
#11 0x086e11b2 in WLApplication::run (this=0x920a838) at /home/drehatlas
#12 0x086df695 in main (argc=1, argv=0xbfffed64) at /home/drehatlas
I will send you the savegame I triggered this crash with per mail