Fix potential exception in drag and drop handling
This commit is contained in:
@@ -68,7 +68,7 @@ namespace FlaxEditor.Content.GUI
|
|||||||
_validDragOver = true;
|
_validDragOver = true;
|
||||||
result = DragDropEffect.Copy;
|
result = DragDropEffect.Copy;
|
||||||
}
|
}
|
||||||
else if (_dragActors.HasValidDrag)
|
else if (_dragActors != null && _dragActors.HasValidDrag)
|
||||||
{
|
{
|
||||||
_validDragOver = true;
|
_validDragOver = true;
|
||||||
result = DragDropEffect.Move;
|
result = DragDropEffect.Move;
|
||||||
@@ -94,7 +94,7 @@ namespace FlaxEditor.Content.GUI
|
|||||||
result = DragDropEffect.Copy;
|
result = DragDropEffect.Copy;
|
||||||
}
|
}
|
||||||
// Check if drop actor(s)
|
// Check if drop actor(s)
|
||||||
else if (_dragActors.HasValidDrag)
|
else if (_dragActors != null && _dragActors.HasValidDrag)
|
||||||
{
|
{
|
||||||
// Import actors
|
// Import actors
|
||||||
var currentFolder = Editor.Instance.Windows.ContentWin.CurrentViewFolder;
|
var currentFolder = Editor.Instance.Windows.ContentWin.CurrentViewFolder;
|
||||||
|
|||||||
Reference in New Issue
Block a user