[gitg] commit: fix seg fault at exit



commit bbcfcec4c59bddc04d5aef0bda556882dc01a104
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Sat Jul 6 17:53:51 2013 +0200

    commit: fix seg fault at exit

 gitg/commit/gitg-commit.vala |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/gitg/commit/gitg-commit.vala b/gitg/commit/gitg-commit.vala
index d4f83b2..ba2be0b 100644
--- a/gitg/commit/gitg-commit.vala
+++ b/gitg/commit/gitg-commit.vala
@@ -43,10 +43,7 @@ namespace GitgCommit
                {
                        set
                        {
-                               if (value != null)
-                               {
-                                       reload();
-                               }
+                               reload();
                        }
                }
 
@@ -296,7 +293,9 @@ namespace GitgCommit
 
                public void reload()
                {
-                       if (d_reloading)
+                       var repository = application.repository;
+
+                       if (repository == null || d_reloading)
                        {
                                return;
                        }
@@ -305,7 +304,7 @@ namespace GitgCommit
 
                        var model = d_main.sidebar.model;
 
-                       var stage = application.repository.stage;
+                       var stage = repository.stage;
 
                        var opts = Ggit.StatusOption.INCLUDE_UNTRACKED |
                                   Ggit.StatusOption.RECURSE_UNTRACKED_DIRS |



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