diff options
author | Milan Crha <mcrha@redhat.com> | 2011-05-26 19:47:45 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-05-26 19:48:57 +0800 |
commit | 1993a293b1704a09d501c92b938608b115676c0c (patch) | |
tree | 4bf544ff3f7528b3977a7d1cb6699121fe494665 /addressbook/gui | |
parent | 6ddc2340d03b6fe3745e97ca10336408833c7294 (diff) | |
download | gsoc2013-evolution-1993a293b1704a09d501c92b938608b115676c0c.tar.gz gsoc2013-evolution-1993a293b1704a09d501c92b938608b115676c0c.tar.zst gsoc2013-evolution-1993a293b1704a09d501c92b938608b115676c0c.zip |
Bug #651135 - Crash using saved search with an empty expression
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-model.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index 3be37f26f0..73d6776b11 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -905,6 +905,9 @@ e_addressbook_model_get_query (EAddressbookModel *model) { g_return_val_if_fail (E_IS_ADDRESSBOOK_MODEL (model), NULL); + if (!model->priv->query) + return NULL; + return e_book_query_to_string (model->priv->query); } @@ -921,6 +924,9 @@ e_addressbook_model_set_query (EAddressbookModel *model, else book_query = e_book_query_from_string (query); + if (!book_query) + return; + if (model->priv->query != NULL) { gchar *old_query, *new_query; |