[evolution/gnome-3-0] Bug #651135 - Crash using saved search with an empty expression
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-0] Bug #651135 - Crash using saved search with an empty expression
- Date: Thu, 26 May 2011 11:50:34 +0000 (UTC)
commit af08ff1bebc895b4de15d1822d96c64d092f2bb5
Author: Milan Crha <mcrha redhat com>
Date: Thu May 26 13:48:22 2011 +0200
Bug #651135 - Crash using saved search with an empty expression
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 8e62e40..17eb2d3 100644
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ b/addressbook/gui/widgets/e-addressbook-model.c
@@ -904,6 +904,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);
}
@@ -920,6 +923,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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]