X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/5bf9955dd5524e9b564f4d520e863b2509a56f89..46a3419bd5693b8b3e42290e370d10aa82c67b61:/unix/gtkdlg.c diff --git a/unix/gtkdlg.c b/unix/gtkdlg.c index f5fe5d49..6f906df1 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); } @@ -1910,8 +1911,6 @@ int do_config_box(const char *title, Config *cfg) struct selparam *selparams = NULL; int nselparams = 0, selparamsize = 0; - do_defaults(NULL, cfg); - dlg_init(&dp); { @@ -1922,7 +1921,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 +2114,7 @@ int do_config_box(const char *title, Config *cfg) gtk_main(); + get_sesslist(&sl, FALSE); dlg_cleanup(&dp); sfree(selparams);