[tracker/parser-unicode-libs-review: 74/85] Avoid critical after last word processed
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/parser-unicode-libs-review: 74/85] Avoid critical after last word processed
- Date: Tue, 4 May 2010 17:30:13 +0000 (UTC)
commit 3cd06f196bcc46417ce627ae19fb0eb69ce7d7cc
Author: Aleksander Morgado <aleksander lanedo com>
Date: Thu Apr 29 15:33:54 2010 +0200
Avoid critical after last word processed
src/libtracker-fts/tracker-parser-glib.c | 3 ++-
src/libtracker-fts/tracker-parser-libunistring.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-fts/tracker-parser-glib.c b/src/libtracker-fts/tracker-parser-glib.c
index de7ba4e..b747a7c 100644
--- a/src/libtracker-fts/tracker-parser-glib.c
+++ b/src/libtracker-fts/tracker-parser-glib.c
@@ -617,7 +617,8 @@ tracker_parser_next (TrackerParser *parser,
str = parser->word;
}
- if (parser->enable_stop_words &&
+ if (str &&
+ parser->enable_stop_words &&
tracker_language_is_stop_word (parser->language, str)) {
*stop_word = TRUE;
} else {
diff --git a/src/libtracker-fts/tracker-parser-libunistring.c b/src/libtracker-fts/tracker-parser-libunistring.c
index 12d1951..b158c03 100644
--- a/src/libtracker-fts/tracker-parser-libunistring.c
+++ b/src/libtracker-fts/tracker-parser-libunistring.c
@@ -416,7 +416,8 @@ tracker_parser_next (TrackerParser *parser,
str = parser->word;
}
- if (parser->enable_stop_words &&
+ if (str &&
+ parser->enable_stop_words &&
tracker_language_is_stop_word (parser->language, str)) {
*stop_word = TRUE;
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]