fix: crash when drag & drop on macOS

This commit is contained in:
leo 2024-09-02 09:26:06 +08:00
parent f586979ac5
commit eca37e8d70
No known key found for this signature in database
3 changed files with 7 additions and 4 deletions

View file

@ -216,7 +216,8 @@ namespace SourceGit.Views
private void DropTab(object sender, DragEventArgs e)
{
if (e.Data.Get("MovedTab") is ViewModels.LauncherPage moved &&
if (e.Data.Contains("MovedTab") &&
e.Data.Get("MovedTab") is ViewModels.LauncherPage moved &&
sender is Border { DataContext: ViewModels.LauncherPage to } &&
to != moved)
{