+ char *savedsession;
+
+ /*
+ * The first time we're called in a new dialog, we must
+ * allocate space to store the current contents of the saved
+ * session edit box (since it must persist even when we switch
+ * panels, but is not part of the Config).
+ */
+ if (!dlg_get_privdata(ssd->editbox, dlg)) {
+ savedsession = (char *)
+ dlg_alloc_privdata(ssd->editbox, dlg, SAVEDSESSION_LEN);
+ savedsession[0] = '\0';
+ } else {
+ savedsession = dlg_get_privdata(ssd->editbox, dlg);
+ }