From 97f16d13a4083faa895e2530f08a98dcc4b584ad Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 7 Dec 2000 19:19:48 +0000 Subject: Add some g_return_if_fail()s to protect from crashes until the code to * mail-callbacks.c: (various) * folder-browser.c (filter_mlist): * mail-autofilter.c (filter_gui_add_from_message): * mail-vfolder.c (vfolder_gui_add_from_message): Add some g_return_if_fail()s to protect from crashes until the code to enable/disable commands based on how many messages are selected is done. svn path=/trunk/; revision=6840 --- mail/mail-callbacks.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'mail/mail-callbacks.c') diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 43692ef6b8..6eb37c48d0 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -425,13 +425,9 @@ mail_reply (CamelFolder *folder, CamelMimeMessage *msg, const char *uid, gboolea EMsgComposer *composer; struct post_send_data *psd; - /* FIXME: I just don't feel like implementing the folder-browser-passing - * garbage. */ - /* FIXME: We really need some way to get the folder_browser into this - function */ - if (!check_send_configuration (NULL) || !folder || - !msg || !uid) - return; + g_return_if_fail (folder != NULL); + g_return_if_fail (msg != NULL); + g_return_if_fail (uid != NULL); psd = g_new (struct post_send_data, 1); psd->folder = folder; @@ -491,7 +487,9 @@ forward_message (FolderBrowser *fb, gboolean attach) GPtrArray *uids; cursor_msg = fb->mail_display->current_message; - if (!check_send_configuration (fb) || !cursor_msg) + g_return_if_fail (cursor_msg != NULL); + + if (!check_send_configuration (fb)) return; composer = e_msg_composer_new (); -- cgit v1.2.3