[gnome-builder] source-view: keep a reference to word start and end marks
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] source-view: keep a reference to word start and end marks
- Date: Thu, 5 May 2016 06:40:09 +0000 (UTC)
commit 670f22f2f781f9554eda2761af04c88fa7ee8eff
Author: Christian Hergert <chergert redhat com>
Date: Thu May 5 09:39:35 2016 +0300
source-view: keep a reference to word start and end marks
These are borrowed references when creating, we need to have our own
reference to them during the lifecycle of the asynchronous callback.
https://bugzilla.gnome.org/show_bug.cgi?id=765993
libide/ide-source-view.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index f8c94b2..5e1f6ad 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -2760,12 +2760,16 @@ ide_source_view_real_motion_notify_event (GtkWidget *widget,
}
data = g_slice_new0 (DefinitionHighlightData);
- data->self = g_object_ref (self);
+ data->self = self;
data->word_start_mark = gtk_text_buffer_create_mark (GTK_TEXT_BUFFER (priv->buffer),
NULL, &start_iter, TRUE);
data->word_end_mark = gtk_text_buffer_create_mark (GTK_TEXT_BUFFER (priv->buffer),
NULL, &end_iter, TRUE);
+ g_object_ref (data->self);
+ g_object_ref (data->word_start_mark);
+ g_object_ref (data->word_end_mark);
+
ide_buffer_get_symbol_at_location_async (priv->buffer,
&iter,
NULL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]