mirror of
https://github.com/tmux/tmux.git
synced 2026-10-14 23:34:22 +00:00
Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master: Do not pass NULL to qsort, and add checks for invalid session or window after swap.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: window-tree.c,v 1.95 2026/08/24 07:06:58 nicm Exp $ */
|
||||
/* $OpenBSD: window-tree.c,v 1.96 2026/08/25 07:23:30 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2017 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -1022,6 +1022,10 @@ window_tree_swap(void *cur_itemdata, void *other_itemdata,
|
||||
window_tree_pull_item(other, &other_session, &other_winlink,
|
||||
&other_pane);
|
||||
|
||||
if (cur_session == NULL || cur_winlink == NULL)
|
||||
return (0);
|
||||
if (other_session == NULL || other_winlink == NULL)
|
||||
return (0);
|
||||
if (cur_session != other_session)
|
||||
return (0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user