mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Add extra check for view title being NULL
This commit is contained in:
		
							parent
							
								
									5d6d24e71a
								
							
						
					
					
						commit
						936226845f
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -501,10 +501,10 @@ void view_child_destroy(struct sway_view_child *child) {
 | 
				
			||||||
static size_t parse_title_format(struct sway_view *view, char *buffer) {
 | 
					static size_t parse_title_format(struct sway_view *view, char *buffer) {
 | 
				
			||||||
	if (!view->title_format || strcmp(view->title_format, "%title") == 0) {
 | 
						if (!view->title_format || strcmp(view->title_format, "%title") == 0) {
 | 
				
			||||||
		const char *title = view_get_title(view);
 | 
							const char *title = view_get_title(view);
 | 
				
			||||||
		if (buffer) {
 | 
							if (buffer && title) {
 | 
				
			||||||
			strcpy(buffer, title);
 | 
								strcpy(buffer, title);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		return strlen(title);
 | 
							return title ? strlen(title) : 0;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	const char *title = view_get_title(view);
 | 
						const char *title = view_get_title(view);
 | 
				
			||||||
	const char *class = view_get_class(view);
 | 
						const char *class = view_get_class(view);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue