Hmm. The windows list can contain NULL, so window_find_by_id is probably
wrong here, but I'm not sure how you got to that codepath in the first
place. Clearly it is possible though.

(I think what you were trying would not work at the moment, we should
probably make cmd_lookup_window pass @foo through cmd_window_session if
it isn't in the current session...)


diff --git a/window.c b/window.c
index 5412963..8894625 100644
--- a/window.c
+++ b/window.c
@@ -262,7 +262,7 @@ window_find_by_id(u_int id)
 
        for (i = 0; i < ARRAY_LENGTH(&windows); i++) {
                w = ARRAY_ITEM(&windows, i);
-               if (w->id == id)
+               if (w != NULL && w->id == id)
                        return (w);
        }
        return (NULL);






On Sun, Feb 08, 2015 at 10:31:15PM -0500, Ben Boeckel wrote:
> Hi,
> 
> With commit df6488a47088ec8bcddc6a1cfa85fec1a462c789, I experienced a
> crash that I haven't been able to reproduce (yet). The setup (as close
> as I can remember):
> 
>   - days-old session; up to session 23 by the command in the backtrace;
>   - client attached to a session with window id 398 as the last window;
>   - wanting to bring that window to the main session I'm using (over
>     SSH), `tmux movew -s @398 -t 23:3`;
>   - tmux crashes with the backtrace below.
> 
> I can dig into the backtrace and get other info if needed.
> 
> Backtrace:
> 
>     http://paste.fedoraproject.org/183140/42345264
> 
> Thanks,
> 
> --Ben
> 
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to