mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Entries in the window list can be NULL, prompted by a crash seen by Ben
Boeckel.
This commit is contained in:
parent
f28032b031
commit
1b2c62afe9
2
window.c
2
window.c
@ -263,7 +263,7 @@ window_find_by_id(u_int id)
|
|||||||
|
|
||||||
for (i = 0; i < ARRAY_LENGTH(&windows); i++) {
|
for (i = 0; i < ARRAY_LENGTH(&windows); i++) {
|
||||||
w = ARRAY_ITEM(&windows, i);
|
w = ARRAY_ITEM(&windows, i);
|
||||||
if (w->id == id)
|
if (w != NULL && w->id == id)
|
||||||
return (w);
|
return (w);
|
||||||
}
|
}
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user