[gtksourceview/wip/search: 11/36] search: do not search NULL string
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/search: 11/36] search: do not search NULL string
- Date: Sat, 6 Jul 2013 15:57:39 +0000 (UTC)
commit eb5156e7f890480a11ab1a434cf20e69402f3642
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sun Jun 30 11:42:19 2013 +0200
search: do not search NULL string
gtksourceview/gtksourcesearch.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/gtksourcesearch.c b/gtksourceview/gtksourcesearch.c
index 69cf757..fb189d1 100644
--- a/gtksourceview/gtksourcesearch.c
+++ b/gtksourceview/gtksourcesearch.c
@@ -390,6 +390,11 @@ basic_forward_search (GtkSourceSearch *search,
{
GtkTextIter begin_search = *iter;
+ if (search->priv->text == NULL)
+ {
+ return FALSE;
+ }
+
while (TRUE)
{
gboolean found = gtk_text_iter_forward_search (&begin_search,
@@ -423,6 +428,11 @@ basic_backward_search (GtkSourceSearch *search,
{
GtkTextIter begin_search = *iter;
+ if (search->priv->text == NULL)
+ {
+ return FALSE;
+ }
+
while (TRUE)
{
gboolean found = gtk_text_iter_backward_search (&begin_search,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]