[gnome-system-tools/gnome-2-32] Don't unref() user face if it's NULL
- From: Milan Bouchet-Valat <milanbv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-tools/gnome-2-32] Don't unref() user face if it's NULL
- Date: Wed, 13 Oct 2010 10:06:23 +0000 (UTC)
commit cb022cdcf3bf8cb5430e7b74c66acc847f002836
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]