mirror of
				https://github.com/tmux/tmux.git
				synced 2025-10-26 12:27:15 +00:00 
			
		
		
		
	Fix crash when killing the current window, reported by Jesus Rafael
Sanchez in GitHub issue 1760.
This commit is contained in:
		
							
								
								
									
										2
									
								
								spawn.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								spawn.c
									
									
									
									
									
								
							| @@ -161,6 +161,8 @@ spawn_window(struct spawn_context *sc, char **cause) | |||||||
| 			xasprintf(cause, "couldn't create window %d", idx); | 			xasprintf(cause, "couldn't create window %d", idx); | ||||||
| 			return (NULL); | 			return (NULL); | ||||||
| 		} | 		} | ||||||
|  | 		if (s->curw == NULL) | ||||||
|  | 			s->curw = sc->wl; | ||||||
| 		sc->wl->session = s; | 		sc->wl->session = s; | ||||||
| 		winlink_set_window(sc->wl, w); | 		winlink_set_window(sc->wl, w); | ||||||
| 	} else | 	} else | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 nicm
					nicm