From 4e83a0a757b66563bba7959caf829ebe0bc88d75 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 3 Oct 2023 22:20:44 +0200 Subject: [PATCH] Fix potential exception in drag and drop handling --- Source/Editor/Content/GUI/ContentView.DragDrop.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Editor/Content/GUI/ContentView.DragDrop.cs b/Source/Editor/Content/GUI/ContentView.DragDrop.cs index 348e2b443..ffce81e2d 100644 --- a/Source/Editor/Content/GUI/ContentView.DragDrop.cs +++ b/Source/Editor/Content/GUI/ContentView.DragDrop.cs @@ -68,7 +68,7 @@ namespace FlaxEditor.Content.GUI _validDragOver = true; result = DragDropEffect.Copy; } - else if (_dragActors.HasValidDrag) + else if (_dragActors != null && _dragActors.HasValidDrag) { _validDragOver = true; result = DragDropEffect.Move; @@ -94,7 +94,7 @@ namespace FlaxEditor.Content.GUI result = DragDropEffect.Copy; } // Check if drop actor(s) - else if (_dragActors.HasValidDrag) + else if (_dragActors != null && _dragActors.HasValidDrag) { // Import actors var currentFolder = Editor.Instance.Windows.ContentWin.CurrentViewFolder;