[gitg/gnome-3-20] Fix getting id of parent of there is no parent
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/gnome-3-20] Fix getting id of parent of there is no parent
- Date: Thu, 25 Aug 2016 14:53:44 +0000 (UTC)
commit f6b7c402cfaf91968d9103b6cd2fb3b41f43d673
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Sun Aug 14 10:30:38 2016 +0200
Fix getting id of parent of there is no parent
This would happen for the first commit in the repo
libgitg/gitg-diff-view-commit-details.vala | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/libgitg/gitg-diff-view-commit-details.vala b/libgitg/gitg-diff-view-commit-details.vala
index 20aeb7f..0e53b27 100644
--- a/libgitg/gitg-diff-view-commit-details.vala
+++ b/libgitg/gitg-diff-view-commit-details.vala
@@ -104,11 +104,14 @@ class Gitg.DiffViewCommitDetails : Gtk.Grid
{
d_parent_commit = value;
- var button = d_parents_map[value.get_id()];
-
- if (button != null)
+ if (value != null)
{
- button.active = true;
+ var button = d_parents_map[value.get_id()];
+
+ if (button != null)
+ {
+ button.active = true;
+ }
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]