[gnome-builder] project-tree: check that the node is still selected
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] project-tree: check that the node is still selected
- Date: Sat, 3 Oct 2015 22:58:32 +0000 (UTC)
commit f9fad9ffae257d44460b0c7b612a0f9559cbd66a
Author: Christian Hergert <christian hergert me>
Date: Sat Oct 3 15:55:50 2015 -0700
project-tree: check that the node is still selected
src/project-tree/gb-project-tree-actions.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/project-tree/gb-project-tree-actions.c b/src/project-tree/gb-project-tree-actions.c
index 1a8ee78..5ee87d6 100644
--- a/src/project-tree/gb-project-tree-actions.c
+++ b/src/project-tree/gb-project-tree-actions.c
@@ -610,6 +610,9 @@ gb_project_tree_actions__project_rename_file_cb (GObject *object,
g_assert (GB_IS_TREE (tree));
node = gb_tree_get_selected (tree);
+ if (node == NULL)
+ goto cleanup;
+
parent = gb_tree_node_get_parent (node);
gb_tree_node_invalidate (parent);
@@ -622,6 +625,7 @@ gb_project_tree_actions__project_rename_file_cb (GObject *object,
else
gb_tree_node_select (parent);
+cleanup:
gtk_widget_hide (GTK_WIDGET (popover));
gtk_widget_destroy (GTK_WIDGET (popover));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]