widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #13795
Re: [Merge] lp:~widelands-dev/widelands/bug-1724145-corrupt-zip-when-saving into lp:widelands
Review: Approve
Diff and testing are fine.
Maybe move the warning to the economy class instead of warning at every method? But that would probably increase the risk of overlooking it.
>From a brief look at the code I guess one could replace the raw pointer to the economy with a weak_ptr and check it before dereferencing it in the methods. But this would mean quite a lot of refactoring for making all economy references shared_ptr.
Another possibility would be a "economy registration" and, e.g., referencing the economies by id. A list of economies already exists in the class Player but I haven't checked whether a pointer to that class will stay valid if the player is defeated.
--
https://code.launchpad.net/~widelands-dev/widelands/bug-1724145-corrupt-zip-when-saving/+merge/349087
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1724145-corrupt-zip-when-saving.
References