diff options
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/e-cal-model.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 246d3dc2bd..8de4244902 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -3438,7 +3438,10 @@ e_cal_model_set_search_query (ECalModel *model, if (priv->search_sexp) g_free (priv->search_sexp); - priv->search_sexp = g_strdup (sexp); + if (!sexp || !*sexp) + priv->search_sexp = NULL; + else + priv->search_sexp = g_strdup (sexp); redo_queries (model); } @@ -3463,7 +3466,10 @@ e_cal_model_set_search_query_with_time_range (ECalModel *model, if (priv->search_sexp) g_free (priv->search_sexp); - priv->search_sexp = g_strdup (sexp); + if (!sexp || !*sexp) + priv->search_sexp = NULL; + else + priv->search_sexp = g_strdup (sexp); do_query = TRUE; } |