1
0
mirror of https://github.com/tmux/tmux.git synced 2025-04-13 09:04:31 +00:00

Entries in the window list can be NULL, prompted by a crash seen by Ben

Boeckel.
This commit is contained in:
nicm 2015-02-09 12:47:18 +00:00
parent f28032b031
commit 1b2c62afe9

View File

@ -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);