I looked into this because I was confused why this crashed. I found that the problem was that the registry was used by two windows at the same time: the old one, because die() would only kill it in the next frame and the new one, because FieldActionWindow() would use the same registry.
The solution I came up with is to distinguish if a new window was created - in which case, the new unique_window will take care of killing the old one - or if the current window should just be close. I the second case, using destroy() is correct. ptal and test if my reasoning is correct. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1644553-buildhelp-button/+merge/312429 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1644553-buildhelp-button into lp:widelands. _______________________________________________ Mailing list: https://launchpad.net/~widelands-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp

