mirror of
https://github.com/tmate-io/tmate.git
synced 2026-08-02 07:32:07 +00: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
1 changed files with 1 additions and 1 deletions
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++) {
|
||||
w = ARRAY_ITEM(&windows, i);
|
||||
if (w->id == id)
|
||||
if (w != NULL && w->id == id)
|
||||
return (w);
|
||||
}
|
||||
return (NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue