Skip to content

Commit

Permalink
Fix crash when blaming a file not in a repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrainger committed Apr 10, 2015
1 parent 722b303 commit 8d95326
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion GitBlame.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>GitBlame</id>
<version>0.4.0</version>
<version>0.4.2</version>
<title>GitBlame GUI for Windows</title>
<authors>Bradley Grainger</authors>
<licenseUrl>https://github.com/bgrainger/GitBlame/blob/master/COPYING</licenseUrl>
Expand Down
2 changes: 1 addition & 1 deletion src/GitBlame/BlameControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ private string GetCommitIdFromPoint(Point point)

protected override void OnScrollChanged()
{
m_layout = m_layout.WithTopLineNumber((int) VerticalOffset + 1);
m_layout = m_layout == null ? null : m_layout.WithTopLineNumber((int) VerticalOffset + 1);
if (RenderSize.Width > 0 && RenderSize.Height > 0)
Render();
}
Expand Down
1 change: 1 addition & 0 deletions src/GitBlame/Models/GitWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ public static bool SplitRepositoryPath(string filePath, out string gitDirectory,
while (currentDirectory != null);

Log.WarnFormat("Can't find .git directory for {0}", filePath);
gitDirectory = null;
fileName = null;
return false;
}
Expand Down
6 changes: 3 additions & 3 deletions src/GitBlame/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("0.4.1")]
[assembly: AssemblyFileVersion("0.4.1")]
[assembly: AssemblyInformationalVersion("0.4.1")]
[assembly: AssemblyVersion("0.4.2")]
[assembly: AssemblyFileVersion("0.4.2")]
[assembly: AssemblyInformationalVersion("0.4.2")]

0 comments on commit 8d95326

Please sign in to comment.