[gnome-builder] project-tree: check for file for before revealing



commit a5708de6f6cb81d6204be40485c5a3a709d687ff
Author: Christian Hergert <chergert redhat com>
Date:   Sun Jul 17 02:20:08 2016 -0700

    project-tree: check for file for before revealing
    
    If there is no file selection, then we can't reveal to a file. Just skip
    the reveal in this case.

 plugins/project-tree/gb-project-tree.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/project-tree/gb-project-tree.c b/plugins/project-tree/gb-project-tree.c
index 8ba8c5e..0f41f05 100644
--- a/plugins/project-tree/gb-project-tree.c
+++ b/plugins/project-tree/gb-project-tree.c
@@ -149,7 +149,8 @@ gb_project_tree_vcs_changed (GbProjectTree *self,
 
   ide_tree_rebuild (IDE_TREE (self));
 
-  gb_project_tree_reveal (self, file);
+  if (file != NULL)
+    gb_project_tree_reveal (self, file);
 }
 
 void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]