[empathy] empathy_pixbuf_contact_status_icon_with_icon_name: don't use icon_filename after freeing it



commit 526cac765322aa7516d46d735fc9b5f1c4f2c228
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Thu Jul 8 14:07:17 2010 +0200

    empathy_pixbuf_contact_status_icon_with_icon_name: don't use icon_filename after freeing it

 libempathy-gtk/empathy-ui-utils.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index ee48fa9..d5abf02 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -539,13 +539,14 @@ empathy_pixbuf_contact_status_icon_with_icon_name (EmpathyContact *contact,
 
 	pix_status = gdk_pixbuf_new_from_file (icon_filename, NULL);
 
-	g_free (icon_filename);
-
 	if (pix_status == NULL) {
 		DEBUG ("Could not open icon %s\n", icon_filename);
+		g_free (icon_filename);
 		return NULL;
 	}
 
+	g_free (icon_filename);
+
 	if (!show_protocol)
 		return pix_status;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]