[gitg/vala] Allow populating with a NULL navigation
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/vala] Allow populating with a NULL navigation
- Date: Tue, 17 Jul 2012 07:57:00 +0000 (UTC)
commit 1b9a01fc7d1feb39bd85db6f0b2a10abe45182a9
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date: Tue Jul 17 09:46:05 2012 +0200
Allow populating with a NULL navigation
libgitg-ext/gitg-ext-navigation-tree-view.vala | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libgitg-ext/gitg-ext-navigation-tree-view.vala b/libgitg-ext/gitg-ext-navigation-tree-view.vala
index e44cc9b..806fb00 100644
--- a/libgitg-ext/gitg-ext-navigation-tree-view.vala
+++ b/libgitg-ext/gitg-ext-navigation-tree-view.vala
@@ -57,6 +57,7 @@ public class NavigationTreeModel : Gtk.TreeStore
}
}
}
+
private SList<Gtk.TreeIter?> d_parents;
private uint d_sections;
private uint d_oid;
@@ -148,8 +149,13 @@ public class NavigationTreeModel : Gtk.TreeStore
return this;
}
- public uint populate(GitgExt.Navigation nav)
+ public uint populate(GitgExt.Navigation? nav)
{
+ if (nav == null)
+ {
+ return 0;
+ }
+
uint ret = begin_section();
nav.populate(this);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]