[Xfce4-commits] <thunar:master> Do not unref g_file_icon_get_file() file (bug #9439).

Nick Schermer noreply at xfce.org
Thu Nov 1 19:58:02 CET 2012


Updating branch refs/heads/master
         to 731f6f73c41697b2eb82bd9082e2d12a5ad4d227 (commit)
       from 17bf70d04195a2341a7bb4ddfa7bc4841c584c7b (commit)

commit 731f6f73c41697b2eb82bd9082e2d12a5ad4d227
Author: Lionel Le Folgoc <lionel at lefolgoc.net>
Date:   Thu Nov 1 18:11:01 2012 +0100

    Do not unref g_file_icon_get_file() file (bug #9439).

 thunar/thunar-file.c   |    3 ++-
 thunar/thunar-notify.c |    5 +----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 3f68156..3187c85 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -3317,7 +3317,8 @@ thunar_file_get_icon_name (const ThunarFile   *file,
       else if (G_IS_FILE_ICON (icon))
         {
           icon_file = g_file_icon_get_file (G_FILE_ICON (icon));
-          icon_name = g_file_get_path (icon_file);
+          if (icon_file != NULL)
+            icon_name = g_file_get_path (icon_file);
         }
     }
   
diff --git a/thunar/thunar-notify.c b/thunar/thunar-notify.c
index b7c647f..428e4c6 100644
--- a/thunar/thunar-notify.c
+++ b/thunar/thunar-notify.c
@@ -85,10 +85,7 @@ thunar_notify_show (ThunarDevice *device,
         {
           icon_file = g_file_icon_get_file (G_FILE_ICON (icon));
           if (icon_file != NULL)
-            {
-              icon_name = g_file_get_path (icon_file);
-              g_object_unref (icon_file);
-            }
+            icon_name = g_file_get_path (icon_file);
         }
       g_object_unref (icon);
     }


More information about the Xfce4-commits mailing list