in tog, check return code of replace_panel()
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;