~vcs-imports/putty/master

Viewing all changes in revision 5488.

  • Committer: Simon Tatham
  • Date: 2019-06-03 18:05:00 UTC
  • Revision ID: git-v1:29cb7e40eb5e0a5bf33b4d6281f513a465231d41
GTK: fix handling of delete event in Change Settings dialog.

If the user closes the Change Settings dialog box using the close
button provided by the window manager (or some analogous thing that
generates the same X11 event) instead of using the Cancel button
within the dialog itself, then after_change_settings_dialog() gets
called with retval < 0, which triggers an early return path in which
we forget to call unregister_dialog(), and as a result, assertions
fail all over the place the _next_ time you try to put up a Change
Settings dialog.

Also, the early return causes ctx.newconf to be memory-leaked. So
rather than just moving the unregister_dialog() call to above the
early return, a better fix is to remove the early return completely,
and simply treat retval<0 the same as retval==0: it doesn't matter
_how_ the user closed the config box without committing the changes,
it only matters that they did.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: