Commit Diff


commit - e2273eeb0781cf96e4745d326fd6e1ff10bc15f4
commit + cf1fe301a38235134f7eb246ec0258c003b76e6f
blob - 58a6c5145ff61ff75e8e698163582f5f1012627c
blob + 223400d05d77d93e3fa2ad9b4c8784f3bd9eacbd
--- tog/tog.c
+++ tog/tog.c
@@ -1254,7 +1254,11 @@ switch_split(struct tog_view *view)
 		v->mode = TOG_VIEW_SPLIT_VERT;
 	if (v->mode == TOG_VIEW_SPLIT_HRZN) {
 		err = offset_selection_down(v);
+		if (err)
+			return err;
 		err = offset_selection_down(v->child);
+		if (err)
+			return err;
 	} else {
 		offset_selection_up(v);
 		offset_selection_up(v->child);