Fix crash when loading an invalid or corrupted icon
GError values should be freed with g_error_free rather than g_free it otherwise causes a crash. Credit to @bebehei for discovering this.
This commit is contained in:
		
							parent
							
								
									b40118bbe3
								
							
						
					
					
						commit
						6ebe7ca413
					
				| @ -330,7 +330,7 @@ static GdkPixbuf *get_pixbuf_from_file(const char *icon_path) | ||||
|                 GError *error = NULL; | ||||
|                 pixbuf = gdk_pixbuf_new_from_file(icon_path, &error); | ||||
|                 if (pixbuf == NULL) | ||||
|                         g_free(error); | ||||
|                         g_error_free(error); | ||||
|         } | ||||
|         return pixbuf; | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Nikos Tsipinakis
						Nikos Tsipinakis