mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	The format callback may not always succeed, so we need to check for
NULL. From Patrick Palka.
This commit is contained in:
		
							
								
								
									
										2
									
								
								format.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								format.c
									
									
									
									
									
								
							@@ -643,6 +643,8 @@ format_find(struct format_tree *ft, const char *key, int modifiers)
 | 
				
			|||||||
	return (NULL);
 | 
						return (NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
found:
 | 
					found:
 | 
				
			||||||
 | 
						if (found == NULL)
 | 
				
			||||||
 | 
							return (NULL);
 | 
				
			||||||
	copy = xstrdup(found);
 | 
						copy = xstrdup(found);
 | 
				
			||||||
	if (modifiers & FORMAT_BASENAME) {
 | 
						if (modifiers & FORMAT_BASENAME) {
 | 
				
			||||||
		saved = copy;
 | 
							saved = copy;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user