[seahorse] pgp: Don't try to ref a NULL pointer



commit 6c6b336f5f8b6b175345f9528806805955dcd51f
Author: Stef Walter <stefw gnome org>
Date:   Tue Jun 18 17:57:18 2013 +0200

    pgp: Don't try to ref a NULL pointer

 pgp/seahorse-gpgme-keyring.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/pgp/seahorse-gpgme-keyring.c b/pgp/seahorse-gpgme-keyring.c
index 7a6f26b..e772812 100644
--- a/pgp/seahorse-gpgme-keyring.c
+++ b/pgp/seahorse-gpgme-keyring.c
@@ -822,7 +822,10 @@ seahorse_gpgme_keyring_get_icon (SeahorsePlace *place)
 static GtkActionGroup *
 seahorse_gpgme_keyring_get_actions (SeahorsePlace *place)
 {
-       return g_object_ref (SEAHORSE_GPGME_KEYRING (place)->pv->actions);
+       SeahorseGpgmeKeyring *self = SEAHORSE_GPGME_KEYRING (place);
+       if (self->pv->actions)
+               return g_object_ref (self->pv->actions);
+       return NULL;
 }
 
 static gchar *


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