[gnome-builder] buffer: avoid rehighlight when disposing
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] buffer: avoid rehighlight when disposing
- Date: Wed, 22 Jun 2016 02:58:47 +0000 (UTC)
commit b39f2b524db61831bcbee4b4af9248691d672c8b
Author: Christian Hergert <chergert redhat com>
Date: Tue Jun 21 19:58:21 2016 -0700
buffer: avoid rehighlight when disposing
libide/buffers/ide-buffer.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libide/buffers/ide-buffer.c b/libide/buffers/ide-buffer.c
index 7d57aaa..a36dd10 100644
--- a/libide/buffers/ide-buffer.c
+++ b/libide/buffers/ide-buffer.c
@@ -561,7 +561,7 @@ ide_buffer__diagnostician_diagnose_cb (GObject *object,
if (!priv->has_done_diagnostics_once)
{
priv->has_done_diagnostics_once = TRUE;
- ide_highlight_engine_rebuild (priv->highlight_engine);
+ ide_buffer_rehighlight (self);
}
}
@@ -2381,6 +2381,10 @@ ide_buffer_rehighlight (IdeBuffer *self)
g_return_if_fail (IDE_IS_BUFFER (self));
+ /* In case we are disposing */
+ if (priv->highlight_engine == NULL)
+ return;
+
if (gtk_source_buffer_get_highlight_syntax (GTK_SOURCE_BUFFER (self)))
{
ide_highlight_engine_rebuild (priv->highlight_engine);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]