X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/6b5cf8b49ddde467168034099c19447df4ba30b8..8dacc30e3a1bd57526c21b701383f69ef93a6703:/unix/gtkdlg.c diff --git a/unix/gtkdlg.c b/unix/gtkdlg.c index f5fe5d49..98cb88f5 100644 --- a/unix/gtkdlg.c +++ b/unix/gtkdlg.c @@ -993,6 +993,7 @@ static void list_selchange(GtkList *list, gpointer data) { struct dlgparam *dp = (struct dlgparam *)data; struct uctrl *uc = dlg_find_bywidget(dp, GTK_WIDGET(list)); + if (!uc) return; uc->ctrl->generic.handler(uc->ctrl, dp, dp->data, EVENT_SELCHANGE); } @@ -1922,7 +1923,7 @@ int do_config_box(const char *title, Config *cfg) gtk_widget_unref(listitem); } - sl.nsessions = 0; + get_sesslist(&sl, TRUE); for (index = 0; index < lenof(scs.sc); index++) { scs.sc[index].action = SHORTCUT_EMPTY; @@ -2115,6 +2116,7 @@ int do_config_box(const char *title, Config *cfg) gtk_main(); + get_sesslist(&sl, FALSE); dlg_cleanup(&dp); sfree(selparams);