]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-ui-utils.c
Merge remote-tracking branch 'pochu/misc-fixes'
[empathy.git] / libempathy-gtk / empathy-ui-utils.c
index 2a4b867815c1c04f949c7a7a6771e7606499551f..32ad451a12115918492780ae78e8ec7854580036 100644 (file)
@@ -622,11 +622,6 @@ avatar_icon_load_read_cb (GObject      *object,
                        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. */
@@ -643,6 +638,11 @@ out_close:
        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);
@@ -947,6 +947,9 @@ empathy_filename_from_icon_name (const gchar *icon_name,
        }
 
        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);
 
@@ -1759,7 +1762,8 @@ empathy_send_file (EmpathyContact *contact, GFile *file)
 
        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 ();