[gitg/vala] Last element is null and we don't get an error to catch anymore



commit 4e3601e920de362191c53ef63969fd8ecc8be369
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Mon May 28 22:44:30 2012 +0200

    Last element is null and we don't get an error to catch anymore

 libgitg/gitg-commit-model.vala |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/libgitg/gitg-commit-model.vala b/libgitg/gitg-commit-model.vala
index e0994b5..153c565 100644
--- a/libgitg/gitg-commit-model.vala
+++ b/libgitg/gitg-commit-model.vala
@@ -245,6 +245,11 @@ public class CommitModel : Object
 				try
 				{
 					id = d_walker.next();
+					if (id == null)
+					{
+						break;
+					}
+
 					commit = d_repository.lookup(id, typeof(Gitg.Commit)) as Gitg.Commit;
 				} catch { break; }
 



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