mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Guard against potential problems
This commit is contained in:
parent
3ad79d43f9
commit
3c106c8e9c
@ -67,6 +67,11 @@ static void tmate_sync_window_panes(struct window *w,
|
|||||||
u_int yoff = unpack_int(&uk);
|
u_int yoff = unpack_int(&uk);
|
||||||
|
|
||||||
wp = window_pane_find_by_id(id);
|
wp = window_pane_find_by_id(id);
|
||||||
|
if (wp && wp->window != w) {
|
||||||
|
/* Pane in the wrong window */
|
||||||
|
tmate_fatal("Pane id=%u in the wrong window", id);
|
||||||
|
}
|
||||||
|
|
||||||
if (!wp) {
|
if (!wp) {
|
||||||
next_window_pane_id = id;
|
next_window_pane_id = id;
|
||||||
wp = window_add_pane(w, TMATE_HLIMIT);
|
wp = window_add_pane(w, TMATE_HLIMIT);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user