[balsa/popover: 65/67] balsa-mblist: Add guards
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/popover: 65/67] balsa-mblist: Add guards
- Date: Wed, 2 Sep 2020 21:52:09 +0000 (UTC)
commit bfb3ab5a33938149d7f622d8568983aa9eb8fe15
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Thu Jul 2 11:12:54 2020 -0400
balsa-mblist: Add guards
src/balsa-mblist.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/balsa-mblist.c b/src/balsa-mblist.c
index 7035abede..5c93af6ba 100644
--- a/src/balsa-mblist.c
+++ b/src/balsa-mblist.c
@@ -2431,7 +2431,11 @@ balsa_mblist_mru_get_url(GSimpleAction *action, GtkWidget *widget, GObject *obje
const gchar *action_name;
const gchar *url;
- action_name = g_action_get_name(G_ACTION(action));
+ g_return_val_if_fail(G_IS_ACTION(action), NULL);
+ g_return_val_if_fail(GTK_IS_WIDGET(widget), NULL);
+ g_return_val_if_fail(G_IS_OBJECT(object), NULL);
+
+ action_name = g_action_get_name((GAction *) action);
url = g_object_get_data(object, action_name);
if (url == NULL) {
@@ -2452,7 +2456,11 @@ balsa_mblist_mru_get_mailbox(GSimpleAction *action, GtkWidget *widget, GObject *
const gchar *url;
LibBalsaMailbox *mailbox;
- action_name = g_action_get_name(G_ACTION(action));
+ g_return_val_if_fail(G_IS_ACTION(action), NULL);
+ g_return_val_if_fail(GTK_IS_WIDGET(widget), NULL);
+ g_return_val_if_fail(G_IS_OBJECT(object), NULL);
+
+ action_name = g_action_get_name((GAction *) action);
url = g_object_get_data(object, action_name);
mailbox = url == NULL ? bmbl_choose_mailbox(widget) : balsa_find_mailbox_by_url(url);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]