avatar_pixbuf_from_loader (closure->loader),
g_object_unref);
- /* Close the file for safety (even though it should be
- * automatically closed when the stream is finalised). */
- g_input_stream_close_async (stream, G_PRIORITY_DEFAULT, NULL,
- (GAsyncReadyCallback) avatar_icon_load_close_cb, NULL);
-
goto out;
} else {
/* Loop round and read another chunk. */
gdk_pixbuf_loader_close (closure->loader, NULL);
out:
+ /* Close the file for safety (even though it should be
+ * automatically closed when the stream is finalised). */
+ g_input_stream_close_async (stream, G_PRIORITY_DEFAULT, NULL,
+ (GAsyncReadyCallback) avatar_icon_load_close_cb, NULL);
+
g_simple_async_result_complete (closure->result);
g_clear_error (&error);
}
icon_info = gtk_icon_theme_lookup_icon (icon_theme, icon_name, size, 0);
+ if (icon_info == NULL)
+ return NULL;
+
ret = g_strdup (gtk_icon_info_get_filename (icon_info));
gtk_icon_info_free (icon_info);
factory = empathy_ft_factory_dup_singleton ();
- empathy_ft_factory_new_transfer_outgoing (factory, contact, file);
+ empathy_ft_factory_new_transfer_outgoing (factory, contact, file,
+ empathy_get_current_action_time ());
uri = g_file_get_uri (file);
manager = gtk_recent_manager_get_default ();