detect errors from tog's view_close() in view_loop()
diff --git a/tog/tog.c b/tog/tog.c
index b32d0a7..4fae45e 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -470,7 +470,9 @@ view_loop(struct tog_view *view)
TAILQ_FOREACH_SAFE(v, &views, entry, t) {
if (v->parent == dead_view) {
TAILQ_REMOVE(&views, v, entry);
- view_close(v);
+ err = view_close(v);
+ if (err)
+ goto done;
}
}
if (dead_view->parent)