mirror of
				https://github.com/labwc/labwc.git
				synced 2025-10-29 05:40:24 -04:00 
			
		
		
		
	osd-thumbnail: make sure item->{normal,active}_title are non-null
The if-statement doesn't make sense, because `view_get_string_prop()` never returns NULL. And if it did, it would cause segfault in `osd_thumbnail_update()`.
This commit is contained in:
		
							parent
							
								
									da96513e70
								
							
						
					
					
						commit
						27cc738985
					
				
					 1 changed files with 6 additions and 8 deletions
				
			
		|  | @ -156,14 +156,12 @@ create_item_scene(struct wlr_scene_tree *parent, struct view *view, | |||
| 
 | ||||
| 	/* title */ | ||||
| 	const char *title = view_get_string_prop(view, "title"); | ||||
| 	if (title) { | ||||
| 	item->normal_title = create_title(item->tree, switcher_theme, | ||||
| 		title, theme->osd_label_text_color, | ||||
| 		theme->osd_bg_color, title_y); | ||||
| 	item->active_title = create_title(item->tree, switcher_theme, | ||||
| 		title, theme->osd_label_text_color, | ||||
| 		switcher_theme->item_active_bg_color, title_y); | ||||
| 	} | ||||
| 
 | ||||
| 	/* icon */ | ||||
| 	int icon_size = switcher_theme->item_icon_size; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 tokyo4j
						tokyo4j