summaryrefslogtreecommitdiffstats
path: root/window.c
diff options
context:
space:
mode:
authornicm <nicm>2015-02-09 12:47:18 +0000
committernicm <nicm>2015-02-09 12:47:18 +0000
commit1b2c62afe9ba0e52bbbcf002d5c4992976d6b4ec (patch)
tree445ae786eda2bd78824dae8ec015dd0caccdacb7 /window.c
parentf28032b03127557377a75d12457fd9a0222843bb (diff)
Entries in the window list can be NULL, prompted by a crash seen by Ben
Boeckel.
Diffstat (limited to 'window.c')
-rw-r--r--window.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/window.c b/window.c
index 0206c6cc..6a742a2e 100644
--- a/window.c
+++ b/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);