mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-03 16:46:18 +00:00 
			
		
		
		
	Do not crash on empty window, reported by Jamie Macdonald in GitHub
issue 1299. Patch from Thomas Adam.
This commit is contained in:
		@@ -296,7 +296,8 @@ window_tree_build_window(struct session *s, struct winlink *wl, void* modedata,
 | 
				
			|||||||
	free(text);
 | 
						free(text);
 | 
				
			||||||
	free(name);
 | 
						free(name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	wp = TAILQ_FIRST(&wl->window->panes);
 | 
						if ((wp = TAILQ_FIRST(&wl->window->panes)) == NULL)
 | 
				
			||||||
 | 
							goto empty;
 | 
				
			||||||
	if (TAILQ_NEXT(wp, entry) == NULL) {
 | 
						if (TAILQ_NEXT(wp, entry) == NULL) {
 | 
				
			||||||
		if (!window_tree_filter_pane(s, wl, wp, filter))
 | 
							if (!window_tree_filter_pane(s, wl, wp, filter))
 | 
				
			||||||
			goto empty;
 | 
								goto empty;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user