[devhelp] do not crash on empty search
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] do not crash on empty search
- Date: Tue, 6 Mar 2012 13:16:19 +0000 (UTC)
commit 0fd03b018876fef5ada0657ec24cb831c6e511b7
Author: FrÃdÃric PÃters <fpeters 0d be>
Date: Tue Mar 6 14:15:36 2012 +0100
do not crash on empty search
https://bugzilla.gnome.org/show_bug.cgi?id=671397
src/dh-keyword-model.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/dh-keyword-model.c b/src/dh-keyword-model.c
index 98a9df8..f26e724 100644
--- a/src/dh-keyword-model.c
+++ b/src/dh-keyword-model.c
@@ -362,6 +362,10 @@ dh_globbed_keywords_new (GStrv keywords)
GList *list = NULL;
struct _DhKeywordGlobPattern *glob_struct;
+ if (keywords == NULL) {
+ return NULL;
+ }
+
for (i = 0; keywords[i] != NULL; i++) {
glob_struct = g_slice_new (struct _DhKeywordGlobPattern);
glob_struct->keyword = keywords[i];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]