diff options
author | Milan Crha <mcrha@redhat.com> | 2011-05-26 19:47:45 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:42:20 +0800 |
commit | bb204a16eac48d7577e7315ea50e050ce009e44d (patch) | |
tree | 402e24b6818039e513ae9f2a26c07023d2332774 /addressbook | |
parent | 7d94ff79130ae0ce3027311c1a8c5125eebdc417 (diff) | |
download | gsoc2013-evolution-bb204a16eac48d7577e7315ea50e050ce009e44d.tar.gz gsoc2013-evolution-bb204a16eac48d7577e7315ea50e050ce009e44d.tar.zst gsoc2013-evolution-bb204a16eac48d7577e7315ea50e050ce009e44d.zip |
Bug #651135 - Crash using saved search with an empty expression
Diffstat (limited to 'addressbook')
-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; |