aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/cal-search-bar.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-09-03 02:44:00 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-09-03 02:44:00 +0800
commitf8374109ac06f8c0528dcf27f214f26c5d2aaf8d (patch)
tree6f433c6f52d6f71cc54e4852c0866c8982e1ecb8 /calendar/gui/cal-search-bar.c
parent8c122d342656c0cad8babf4cb26796256b636fb4 (diff)
downloadgsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar
gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.gz
gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.bz2
gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.lz
gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.xz
gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.zst
gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.zip
** Fix for bug #471791 (Move away from asserts to g_ret*)
svn path=/trunk/; revision=34156
Diffstat (limited to 'calendar/gui/cal-search-bar.c')
-rw-r--r--calendar/gui/cal-search-bar.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/calendar/gui/cal-search-bar.c b/calendar/gui/cal-search-bar.c
index de7d582c0e..4d0f50201c 100644
--- a/calendar/gui/cal-search-bar.c
+++ b/calendar/gui/cal-search-bar.c
@@ -191,7 +191,8 @@ free_categories (GPtrArray *categories)
int i;
for (i = 0; i < categories->len; i++) {
- g_assert (categories->pdata[i] != NULL);
+ if (categories->pdata[i] == NULL)
+ continue;
g_free (categories->pdata[i]);
}
@@ -256,7 +257,7 @@ get_current_category (CalSearchBar *cal_search)
priv = cal_search->priv;
- g_assert (priv->categories != NULL);
+ g_return_val_if_fail (priv->categories != NULL, NULL);
viewid = e_search_bar_get_viewitem_id (E_SEARCH_BAR (cal_search));
@@ -504,7 +505,7 @@ regen_query (CalSearchBar *cal_search)
break;
default:
- g_assert_not_reached ();
+ g_return_if_reached ();
}
g_free (show_option_sexp);
@@ -606,7 +607,7 @@ make_suboptions (CalSearchBar *cal_search)
priv = cal_search->priv;
- g_assert (priv->categories != NULL);
+ g_return_if_fail (priv->categories != NULL);
/* Categories plus "all", "unmatched", separator, terminator */
@@ -869,7 +870,7 @@ cal_search_bar_set_categories (CalSearchBar *cal_search, GPtrArray *categories)
priv = cal_search->priv;
- g_assert (priv->categories != NULL);
+ g_return_if_fail (priv->categories != NULL);
free_categories (priv->categories);
priv->categories = sort_categories (categories);