1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-03-30 18:22:50 -05:00
Simon Tatham 296b6291d3 GTK: fix a crash when clicking Cancel on Change Settings.
I only observed this in the GTK1 build, but I don't know for sure it
can't happen in other situations, so there's no reason not to be
careful.

What seems to happen is that when the user clicks Cancel on the Change
Settings dialog box, we call gtk_widget_destroy on the window, which
emits the "destroy" signal on the window, our handler for which frees
the whole dlgparam. But _then_ GTK goes through and cleans up all the
sub-widgets of the dialog box, and some of those generate extra
events. In particular, destroying a list box is done by first deleting
all the list entries - and if one of those is selected, the list box's
selection changes, triggering an event which calls our callback that
tries to look up the control in the dlgparam we just freed.

My simple workaround is to defer actually freeing the dlgparam, via a
toplevel callback. Then it's still lying around empty while all those
random events are firing.
2024-12-07 19:49:20 +00:00
..
2022-05-05 19:04:34 +01:00
2023-12-18 14:47:48 +00:00
2024-06-29 12:00:12 +01:00
2024-06-29 12:00:12 +01:00