Fix getting id of parent of there is no parent

This would happen for the first commit in the repo
This commit is contained in:
Jesse van den Kieboom 2016-08-14 10:30:38 +02:00
parent f37ff72ea0
commit 9af17f32ae

View file

@ -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;
}
}
}
}