X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/3d88e64dfcf5dc0fd361ce0c504c67a9196ce44c..7440fd4419acfc9c784f142fb9dee3e64c9a18c2:/winctrls.c diff --git a/winctrls.c b/winctrls.c index 204bc4a4..4a35cb6b 100644 --- a/winctrls.c +++ b/winctrls.c @@ -13,17 +13,14 @@ * button. */ -#include -#include #include #include -#include "winstuff.h" +#include "putty.h" #include "misc.h" #include "dialog.h" -#include "puttymem.h" -#include "putty.h" +#include #define GAPBETWEEN 3 #define GAPWITHIN 1 @@ -287,6 +284,7 @@ void radioline(struct ctlpos *cp, char *text, int id, int nacross, ...) if (!btext) break; bid = va_arg(ap, int); + nbuttons++; } va_end(ap); buttons = snewn(nbuttons, struct radio); @@ -2458,7 +2456,7 @@ void dp_init(struct dlgparam *dp) dp->focused = dp->lastfocused = NULL; memset(dp->shortcuts, 0, sizeof(dp->shortcuts)); dp->hwnd = NULL; - dp->errtitle = NULL; + dp->wintitle = dp->errtitle = NULL; dp->privdata = newtree234(perctrl_privdata_cmp); } @@ -2482,6 +2480,8 @@ void dp_cleanup(struct dlgparam *dp) freetree234(dp->privdata); dp->privdata = NULL; } + sfree(dp->wintitle); + sfree(dp->errtitle); } void *dlg_get_privdata(union control *ctrl, void *dlg)