[balsa/gtk3] Allow NULL search iter
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Allow NULL search iter
- Date: Mon, 25 Feb 2013 22:46:12 +0000 (UTC)
commit 6eddbd371937bcc1cce3e4e6b3242ff8b7c32e6f
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Mon Feb 25 17:45:07 2013 -0500
Allow NULL search iter
* libbalsa/mailbox.c (libbalsa_mailbox_search_iter_ref): allow
NULL iter.
ChangeLog | 5 +++++
libbalsa/mailbox.c | 8 +++-----
2 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 960fe35..366eea2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2013-02-25 Peter Bloomfield
+ * libbalsa/mailbox.c (libbalsa_mailbox_search_iter_ref): allow
+ NULL iter.
+
+2013-02-25 Peter Bloomfield
+
* configure.in: actually error out if libsecret devel is not
installed.
diff --git a/libbalsa/mailbox.c b/libbalsa/mailbox.c
index 7d34903..d8729eb 100644
--- a/libbalsa/mailbox.c
+++ b/libbalsa/mailbox.c
@@ -1677,16 +1677,14 @@ libbalsa_mailbox_search_iter_view(LibBalsaMailbox * mailbox)
LibBalsaMailboxSearchIter *
libbalsa_mailbox_search_iter_ref(LibBalsaMailboxSearchIter * search_iter)
{
- g_return_val_if_fail(search_iter != NULL, NULL);
- g_return_val_if_fail(search_iter->ref_count > 0, NULL);
-
- ++search_iter->ref_count;
+ if (search_iter)
+ ++search_iter->ref_count;
return search_iter;
}
/* Decrement reference count of a LibBalsaMailboxSearchIter, if it is
- * non-NULL and validi, and free it if it goes to zero */
+ * non-NULL and valid, and free it if it goes to zero */
void
libbalsa_mailbox_search_iter_unref(LibBalsaMailboxSearchIter * search_iter)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]