Commit a6d7eb8dbe881d3132e03307cec02e1acce931d1

Stefan Sperling 2018-10-24T11:27:28

in tog, check return code of replace_panel()

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/tog/tog.c b/tog/tog.c
index 356c450..885bafc 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -413,7 +413,8 @@ view_resize(struct tog_view *view)
 
 	if (wresize(view->window, nlines, ncols) == ERR)
 		return got_error_from_errno();
-	replace_panel(view->panel, view->window);
+	if (replace_panel(view->panel, view->window) == ERR)
+		return got_error_from_errno();
 
 	view->nlines = nlines;
 	view->ncols = ncols;