GunChleoc has proposed merging
lp:~widelands-dev/widelands/bug-1735967-productionsitewindow into lp:widelands.
Commit message:
Productionsite windows no longer handle their notifications when they are
dying. This will hopefully fix a use-after-free when the worker table is
updated while the window is being closed.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1735967 in widelands: "use-after-free in
ProductionSiteWindow::update_worker_table"
https://bugs.launchpad.net/widelands/+bug/1735967
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1735967-productionsitewindow/+merge/335020
--
Your team Widelands Developers is requested to review the proposed merge of
lp:~widelands-dev/widelands/bug-1735967-productionsitewindow into lp:widelands.
=== modified file 'src/wui/productionsitewindow.cc'
--- src/wui/productionsitewindow.cc 2017-11-30 20:56:22 +0000
+++ src/wui/productionsitewindow.cc 2017-12-11 09:54:02 +0000
@@ -48,6 +48,9 @@
worker_caps_(nullptr) {
productionsitenotes_subscriber_ = Notifications::subscribe<Widelands::NoteBuilding>(
[this](const Widelands::NoteBuilding& note) {
+ if (is_dying_) {
+ return;
+ }
Widelands::ProductionSite* production_site = production_site_.get(igbase()->egbase());
if (production_site == nullptr) {
return;
_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~widelands-dev
More help : https://help.launchpad.net/ListHelp