~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add a missing null pointer check in one of the dialog box functions.
[sgt/putty]
/
windows
/
winctrls.c
diff --git
a/windows/winctrls.c
b/windows/winctrls.c
index
c9300cd
..
60e32f5
100644
(file)
--- 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: