summaryrefslogtreecommitdiffstats
path: root/notify.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2012-08-21 10:00:33 +0000
committerNicholas Marriott <nicm@openbsd.org>2012-08-21 10:00:33 +0000
commit58e8e0eac841d6d337de3da4e2f81665c3cd3faa (patch)
tree512efdef7e6cc33d659c2de5fdeb0c2a75eb71c4 /notify.c
parenta1e4908ed7d14c5b406541144017d57db4750c56 (diff)
Fix up window reference counting and don't crash if the rename timer
fires while the window is dead but still referenced. Fixes problem reported by Michael Scholz.
Diffstat (limited to 'notify.c')
-rw-r--r--notify.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/notify.c b/notify.c
index dad50b94..33fea56c 100644
--- a/notify.c
+++ b/notify.c
@@ -125,7 +125,8 @@ notify_drain(void)
if (ne->session != NULL)
ne->session->references--;
if (ne->window != NULL)
- ne->window->references--;
+ window_remove_ref(ne->window);
+
TAILQ_REMOVE(&notify_queue, ne, entry);
free(ne);
}