[gnome-system-tools] Don't unref() user face if it's NULL



commit 2587e9dface8193f07ed161add59337380cfe48e
Author: Milan Bouchet-Valat <nalimilan club fr>
Date:   Wed Oct 13 12:03:32 2010 +0200

    Don't unref() user face if it's NULL
    
    If user account doesn't have a face, pixbuf is NULL, and unreferencing
    it shows a warning.

 src/users/user-settings.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/users/user-settings.c b/src/users/user-settings.c
index 7c2e52a..49317f3 100644
--- a/src/users/user-settings.c
+++ b/src/users/user-settings.c
@@ -319,7 +319,8 @@ user_settings_show (OobsUser *user)
 	face_image = gst_dialog_get_widget (tool->main_dialog, "user_settings_face");
 	face = user_settings_get_user_face (user, 60);
 	gtk_image_set_from_pixbuf (GTK_IMAGE (face_image), face);
-	g_object_unref (face);
+	if (face)
+		g_object_unref (face);
 
 	profile_label = gst_dialog_get_widget (tool->main_dialog, "user_settings_profile");
 	profile_button = gst_dialog_get_widget (tool->main_dialog, "edit_user_profile_button");



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