diff options
author | Milan Crha <mcrha@redhat.com> | 2012-11-30 22:29:34 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2012-11-30 22:30:45 +0800 |
commit | ab3f65a15e1b6fe5bdf488e6e879899e283ccc43 (patch) | |
tree | ac594d423506e1fa1d47fbf057a1ec71947bf7a5 /smime/gui | |
parent | 1eb7481305d0feda31538d072c206aab5dbdeabd (diff) | |
download | gsoc2013-evolution-ab3f65a15e1b6fe5bdf488e6e879899e283ccc43.tar gsoc2013-evolution-ab3f65a15e1b6fe5bdf488e6e879899e283ccc43.tar.gz gsoc2013-evolution-ab3f65a15e1b6fe5bdf488e6e879899e283ccc43.tar.bz2 gsoc2013-evolution-ab3f65a15e1b6fe5bdf488e6e879899e283ccc43.tar.lz gsoc2013-evolution-ab3f65a15e1b6fe5bdf488e6e879899e283ccc43.tar.xz gsoc2013-evolution-ab3f65a15e1b6fe5bdf488e6e879899e283ccc43.tar.zst gsoc2013-evolution-ab3f65a15e1b6fe5bdf488e6e879899e283ccc43.zip |
Address couple issues found by a Coverity scan
Diffstat (limited to 'smime/gui')
-rw-r--r-- | smime/gui/certificate-viewer.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/smime/gui/certificate-viewer.c b/smime/gui/certificate-viewer.c index af1b3226ce..9f140cadaa 100644 --- a/smime/gui/certificate-viewer.c +++ b/smime/gui/certificate-viewer.c @@ -268,8 +268,9 @@ fill_in_details (CertificateViewerData *cvm_data, ECert *cert) { GList *l; - GtkTreeIter *root = NULL; + GtkTreeIter root; GtkTreeSelection *selection; + gboolean root_set = FALSE; /* hook up all the hierarchy tree foo */ cvm_data->hierarchy_store = gtk_tree_store_new (2, G_TYPE_STRING, G_TYPE_OBJECT); @@ -324,14 +325,15 @@ fill_in_details (CertificateViewerData *cvm_data, if (!str) str = e_cert_get_subject_name (c); - gtk_tree_store_insert (cvm_data->hierarchy_store, &new_iter, root, -1); + gtk_tree_store_insert (cvm_data->hierarchy_store, &new_iter, root_set ? &root : NULL, -1); gtk_tree_store_set ( cvm_data->hierarchy_store, &new_iter, 0, str, 1, c, -1); - root = &new_iter; + root = new_iter; + root_set = TRUE; } gtk_tree_view_expand_all (GTK_TREE_VIEW (cvm_data->hierarchy_tree)); |