]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Add a missing null pointer check in one of the dialog box functions.
authorSimon Tatham <anakin@pobox.com>
Mon, 22 Jul 2013 07:11:48 +0000 (07:11 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 22 Jul 2013 07:11:48 +0000 (07:11 +0000)
[originally from svn r9958]

windows/winctrls.c

index c9300cdd82d10057c08cdda34a0a1d8d011cc407..60e32f5e6ec3afb28c5482eb17cf6dd1435e8d7a 100644 (file)
@@ -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: