Closed cwendling closed 2 years ago
For anybody who'd merge this, please do not squash the commits together, it'd make more sense to have the split as is (and they all leave the code in an acceptable state, although c81cc650a7d3307feed134df719722444db1769c alone is not a fix.
Github just did something ugly: merged only the LAST commit on a "rebase and merge" will emergency revert and do a manual merge, so as to avoid force-pushing to master
Revert PR showed all three commits, looks like git worked and github just didn't show it all. Running git log or looking at the history on a local pull of master shows all three commits separately. Thus we are good to go here
@lukefromdc thanks, and yep master looks fine
Cherrypicked to 1.26 after testing on that branch
Fix #1630.
This contains 3 separate but fairly closely related changes (see each commit for details):
1) Fix reference to objects by releasing them in
dispose()
as we ought to instead of waiting forfinalize()
. This is the real fix, and is the right thing to do in the GObject world: no object is supposed to hold a reference to any other object afterdispose()
. 2) Simplification of the icon update code, which optimizes it as well and allows for improving safety in 3 -- thanks @rbuj 3) thanks to 2, make use ofg_signal_connect_object()
to improve safety of the handler by making sure all parameters are valid at signal dispatch time.1 alone is enough of a fix, but 2 is a nice improvement of the code, and 3 makes things safer. Actually, 2+3 alone are also a fix for #1630, although not as thorough.