[gtksourceview] SearchSettings: fix bug with empty search-text
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] SearchSettings: fix bug with empty search-text
- Date: Mon, 23 Sep 2013 16:45:53 +0000 (UTC)
commit 102262afcc8a4dba9868c5abf50ff73ea555c0a0
Author: Sébastien Wilmet <swilmet gnome org>
Date: Mon Sep 23 18:38:04 2013 +0200
SearchSettings: fix bug with empty search-text
When setting an empty search-text (""), the set_search_text() function
store NULL instead. Other places in the code (in SearchContext) assume
that.
This avoids an infinite loop in the SearchContext.
gtksourceview/gtksourcesearchsettings.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gtksourceview/gtksourcesearchsettings.c b/gtksourceview/gtksourcesearchsettings.c
index 5f5269b..ac5ba96 100644
--- a/gtksourceview/gtksourcesearchsettings.c
+++ b/gtksourceview/gtksourcesearchsettings.c
@@ -119,8 +119,7 @@ gtk_source_search_settings_set_property (GObject *object,
switch (prop_id)
{
case PROP_SEARCH_TEXT:
- g_free (settings->priv->search_text);
- settings->priv->search_text = g_value_dup_string (value);
+ gtk_source_search_settings_set_search_text (settings, g_value_get_string (value));
break;
case PROP_CASE_SENSITIVE:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]