Merge lp:~widelands-dev/widelands/bug_1794339_center_wo_parent into lp:widelands
Proposed by
Klaus Halfmann
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 8873 | ||||
Proposed branch: | lp:~widelands-dev/widelands/bug_1794339_center_wo_parent | ||||
Merge into: | lp:widelands | ||||
Diff against target: |
62 lines (+11/-7) 2 files modified
src/network/gameclient.cc (+3/-2) src/ui_basic/window.cc (+8/-5) |
||||
To merge this branch: | bzr merge lp:~widelands-dev/widelands/bug_1794339_center_wo_parent | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
GunChleoc | Approve | ||
Review via email: mp+355885@code.launchpad.net |
This proposal supersedes a proposal from 2018-09-29.
Commit message
Assert null access in Window:
Description of the change
Assert that Window has a parent instead of crashing.
Keep d->modal as parent window in GameClient::run() and set to nullptr as late as possible. This should resolve the original bug.
To post a comment you must log in.
No, we can't center to a global parent, because the direct parent is already nullptr.
I am wondering whether this fix doesn't just mask the real bug - it would be interesting to track down why that particular window has no parent. There's something wrong with the control flow there.