Skip to content
Snippets Groups Projects
Commit 1388c21e authored by Cyrille Béraud's avatar Cyrille Béraud Committed by Tristan Matthews
Browse files

addressbook: avoid ref if NULL


If pixbuf is NULL, glib will warn and return.

Refs #62204

Signed-off-by: default avatarTristan Matthews <tristan.matthews@savoirfairelinux.com>

Change-Id: I9aefd20be471045bc8d69a9820d2f3a057473a47
parent 7b93cb44
Branches
Tags
No related merge requests found
......@@ -205,9 +205,9 @@ pixbuf_from_contact(EContact *contact)
/* Force remaining parse operations to complete */
gdk_pixbuf_loader_close(loader, NULL);
pixbuf = gdk_pixbuf_loader_get_pixbuf(loader);
}
/* Ensure that pixbuf isn't destroyed with loader */
g_object_ref(pixbuf);
}
g_object_unref(loader);
} else if (photo->type == E_CONTACT_PHOTO_TYPE_URI) {
gchar *filename = g_filename_from_uri(photo->data.uri, NULL, NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment