[gnome-builder] libide: only connect to change monitor if vcs gave us one
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide: only connect to change monitor if vcs gave us one
- Date: Tue, 24 Mar 2015 00:25:43 +0000 (UTC)
commit 1573d348185f2ec31305a6a7d56a6e7a673a550a
Author: Christian Hergert <christian hergert me>
Date: Mon Mar 23 17:25:26 2015 -0700
libide: only connect to change monitor if vcs gave us one
libide/ide-buffer.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/libide/ide-buffer.c b/libide/ide-buffer.c
index 081410a..0836353 100644
--- a/libide/ide-buffer.c
+++ b/libide/ide-buffer.c
@@ -522,12 +522,15 @@ ide_buffer_reload_change_monitor (IdeBuffer *self)
vcs = ide_context_get_vcs (priv->context);
priv->change_monitor = ide_vcs_get_buffer_change_monitor (vcs, self);
- priv->change_monitor_changed_handler =
- g_signal_connect_object (priv->change_monitor,
- "changed",
- G_CALLBACK (ide_buffer__change_monitor_changed_cb),
- self,
- G_CONNECT_SWAPPED);
+ if (priv->change_monitor != NULL)
+ {
+ priv->change_monitor_changed_handler =
+ g_signal_connect_object (priv->change_monitor,
+ "changed",
+ G_CALLBACK (ide_buffer__change_monitor_changed_cb),
+ self,
+ G_CONNECT_SWAPPED);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]