fix: crash when de-select commit using Ctrl

This commit is contained in:
leo 2024-06-20 17:32:14 +08:00
parent 376f775078
commit 8c8e09aa67
No known key found for this signature in database
2 changed files with 5 additions and 2 deletions

View file

@ -9,6 +9,7 @@
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="SourceGit.Views.InteractiveRebase"
x:DataType="vm:InteractiveRebase"
Icon="/App.ico"
Title="{DynamicResource Text.InteractiveRebase}"
Width="1080" Height="720"
WindowStartupLocation="CenterOwner">
@ -260,7 +261,9 @@
<GridSplitter Grid.Row="1"
MinHeight="1"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
Background="Transparent"/>
Background="Transparent"
BorderThickness="0,1,0,0"
BorderBrush="{DynamicResource Brush.Border2}"/>
<Border Grid.Row="2" Background="{DynamicResource Brush.Window}">
<Path Width="128" Height="128"

View file

@ -59,7 +59,7 @@ namespace SourceGit.Views
disposable.Dispose();
var vm = DataContext as ViewModels.CommitDetail;
if (vm == null)
if (vm == null || vm.Commit == null)
{
Content = null;
GC.Collect();