icon: Replace deprecated g_memdup with g_memdup2 where possible
This avoids a potential conversion from gsize to guint and silences a warning.
This commit is contained in:
		
							parent
							
								
									7c6620c92d
								
							
						
					
					
						commit
						1d3822ee8b
					
				| @ -347,7 +347,13 @@ GdkPixbuf *icon_get_for_data(GVariant *data, char **id) | ||||
|                 return NULL; | ||||
|         } | ||||
| 
 | ||||
|         // g_memdup is deprecated in glib 2.67.4 and higher.
 | ||||
|         // g_memdup2 is a safer alternative
 | ||||
| #if GLIB_CHECK_VERSION(2,67,3) | ||||
|         data_pb = (guchar *) g_memdup2(g_variant_get_data(data_variant), len_actual); | ||||
| #else | ||||
|         data_pb = (guchar *) g_memdup(g_variant_get_data(data_variant), len_actual); | ||||
| #endif | ||||
| 
 | ||||
|         pixbuf = gdk_pixbuf_new_from_data(data_pb, | ||||
|                                           GDK_COLORSPACE_RGB, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 fwsmit
						fwsmit