[gnome-builder/gnome-builder-3-20] buffer: clean up diagnostics asignment
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-20] buffer: clean up diagnostics asignment
- Date: Fri, 13 May 2016 12:43:12 +0000 (UTC)
commit 4f72730ee2f868af4bc2979e31ba353965783807
Author: Christian Hergert <chergert redhat com>
Date: Thu May 12 17:45:39 2016 +0300
buffer: clean up diagnostics asignment
libide/ide-buffer.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/libide/ide-buffer.c b/libide/ide-buffer.c
index 46fb8da..f967b0f 100644
--- a/libide/ide-buffer.c
+++ b/libide/ide-buffer.c
@@ -486,13 +486,15 @@ ide_buffer_set_diagnostics (IdeBuffer *self,
if (diagnostics != priv->diagnostics)
{
- g_clear_pointer (&priv->diagnostics, ide_diagnostics_unref);
- priv->diagnostics = diagnostics ? ide_diagnostics_ref (diagnostics) : NULL;
-
ide_buffer_clear_diagnostics (self);
- if (diagnostics)
- ide_buffer_update_diagnostics (self, diagnostics);
+ g_clear_pointer (&priv->diagnostics, ide_diagnostics_unref);
+
+ if (diagnostics != NULL)
+ {
+ priv->diagnostics = ide_diagnostics_ref (diagnostics);
+ ide_buffer_update_diagnostics (self, diagnostics);
+ }
g_signal_emit (self, signals [LINE_FLAGS_CHANGED], 0);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_HAS_DIAGNOSTICS]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]