[gitg] Fix assertion when loading a repo from the dash
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Fix assertion when loading a repo from the dash
- Date: Mon, 11 Jan 2016 19:59:39 +0000 (UTC)
commit 3fd4e1151560c05c32e0bc8cd9dbc122044fcc98
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Mon Jan 11 20:58:42 2016 +0100
Fix assertion when loading a repo from the dash
The repository might be null
libgitg/gitg-diff-view-file-renderer-text.vala | 4 ++--
libgitg/gitg-diff-view-file.vala | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/libgitg/gitg-diff-view-file-renderer-text.vala b/libgitg/gitg-diff-view-file-renderer-text.vala
index 5800104..c8d5e95 100644
--- a/libgitg/gitg-diff-view-file-renderer-text.vala
+++ b/libgitg/gitg-diff-view-file-renderer-text.vala
@@ -84,7 +84,7 @@ class Gitg.DiffViewFileRendererText : Gtk.SourceView, DiffSelectable, DiffViewFi
public int maxlines { get; set; }
public Ggit.DiffDelta? delta { get; construct set; }
- public Repository repository { get; construct set; }
+ public Repository? repository { get; construct set; }
public bool highlight
{
@@ -155,7 +155,7 @@ class Gitg.DiffViewFileRendererText : Gtk.SourceView, DiffSelectable, DiffViewFi
}
}
- public DiffViewFileRendererText(Repository repository, Ggit.DiffDelta delta, bool new_is_workdir,
bool can_select)
+ public DiffViewFileRendererText(Repository? repository, Ggit.DiffDelta delta, bool new_is_workdir,
bool can_select)
{
Object(repository: repository, new_is_workdir: new_is_workdir, delta: delta, can_select:
can_select);
}
diff --git a/libgitg/gitg-diff-view-file.vala b/libgitg/gitg-diff-view-file.vala
index 1ed0986..759e10d 100644
--- a/libgitg/gitg-diff-view-file.vala
+++ b/libgitg/gitg-diff-view-file.vala
@@ -97,14 +97,14 @@ class Gitg.DiffViewFile : Gtk.Grid
}
public Ggit.DiffDelta? delta { get; construct set; }
- public Repository repository { get; construct set; }
+ public Repository? repository { get; construct set; }
- public DiffViewFile(Repository repository, Ggit.DiffDelta delta)
+ public DiffViewFile(Repository? repository, Ggit.DiffDelta delta)
{
Object(repository: repository, delta: delta);
}
- public DiffViewFile.text(Repository repository, Ggit.DiffDelta delta, bool new_is_workdir, bool
handle_selection)
+ public DiffViewFile.text(Repository? repository, Ggit.DiffDelta delta, bool new_is_workdir, bool
handle_selection)
{
this(repository, delta);
@@ -115,12 +115,12 @@ class Gitg.DiffViewFile : Gtk.Grid
this.renderer.bind_property("removed", d_diff_stat_file, "removed");
}
- public DiffViewFile.binary(Repository repository, Ggit.DiffDelta delta)
+ public DiffViewFile.binary(Repository? repository, Ggit.DiffDelta delta)
{
this(repository, delta);
}
- public DiffViewFile.image(Repository repository, Ggit.DiffDelta delta)
+ public DiffViewFile.image(Repository? repository, Ggit.DiffDelta delta)
{
this(repository, delta);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]