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

@ -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();