Commit 6e3e5d9c28d4cb12a35d58ed075a25edd6b6a98f

Stefan Sperling 2018-10-18T15:35:24

fix a NULL deref in tog

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/tog/tog.c b/tog/tog.c
index c414939..82f68df 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -403,7 +403,7 @@ view_resize(struct tog_view *view)
 	view->lines = LINES;
 	view->cols = COLS;
 
-	if (view_is_parent_view(view)) {
+	if (view->child) {
 		view->child->begin_x = view_split_begin_x(view->begin_x);
 		if (view->child->begin_x == 0) {
 			view_fullscreen(view->child);