X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/fc9b052a2fc832ea8bc3efa9c79eba0f961830b2..33b1edda1f3fa65f5cad3b8a73cdc2fd61558ec9:/windows/winctrls.c diff --git a/windows/winctrls.c b/windows/winctrls.c index c9300cdd..60e32f5e 100644 --- a/windows/winctrls.c +++ b/windows/winctrls.c @@ -2366,6 +2366,8 @@ void dlg_set_focus(union control *ctrl, void *dlg) struct winctrl *c = dlg_findbyctrl(dp, ctrl); int id; HWND ctl; + if (!c) + return; switch (ctrl->generic.type) { case CTRL_EDITBOX: id = c->base_id + 1; break; case CTRL_RADIO: