[gnome-builder] symbol-tree: only update tree with new valid tree
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] symbol-tree: only update tree with new valid tree
- Date: Mon, 11 Sep 2017 21:00:19 +0000 (UTC)
commit f6e0f9d005b0894a043d027bce0b1fc94de18e1d
Author: Christian Hergert <chergert redhat com>
Date: Mon Sep 11 14:00:05 2017 -0700
symbol-tree: only update tree with new valid tree
It can happen that we get a parse error because the user was typing and
left the source in a non-compilable state.
.../symbol-tree/gbp-symbol-layout-stack-addin.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/plugins/symbol-tree/gbp-symbol-layout-stack-addin.c
b/plugins/symbol-tree/gbp-symbol-layout-stack-addin.c
index 6ddef56..1392da4 100644
--- a/plugins/symbol-tree/gbp-symbol-layout-stack-addin.c
+++ b/plugins/symbol-tree/gbp-symbol-layout-stack-addin.c
@@ -243,7 +243,13 @@ gbp_symbol_layout_stack_addin_get_symbol_tree_cb (GObject *object,
/* If we were destroyed, short-circuit */
if (self->button != NULL)
- gbp_symbol_menu_button_set_symbol_tree (self->button, tree);
+ {
+ /* Only override if we got a new value (this helps with situations
+ * where the parse tree breaks intermittently.
+ */
+ if (tree != NULL)
+ gbp_symbol_menu_button_set_symbol_tree (self->button, tree);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]