[recipes] Handle empty search terms without crashing
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Handle empty search terms without crashing
- Date: Sun, 1 Jan 2017 16:07:12 +0000 (UTC)
commit c660e436b9ae452eee5e7e1f251a4ab87cbd80e4
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jan 1 10:22:34 2017 -0500
Handle empty search terms without crashing
Now that search terms are an array, we need to treat the
empty array like a NULL string.
src/gr-recipe-store.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gr-recipe-store.c b/src/gr-recipe-store.c
index c092671..0a2bc90 100644
--- a/src/gr-recipe-store.c
+++ b/src/gr-recipe-store.c
@@ -1646,7 +1646,7 @@ gr_recipe_search_set_terms (GrRecipeSearch *search,
{
gboolean narrowing;
- if (terms == NULL) {
+ if (terms == NULL || terms[0] == NULL) {
stop_search (search);
g_clear_pointer (&search->query, g_strfreev);
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]