Fix rare error on drag&drop in Editor
This commit is contained in:
@@ -209,16 +209,15 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
public override DragDropEffect OnDragMove(ref Float2 location, DragData data)
|
||||
{
|
||||
var result = base.OnDragMove(ref location, data);
|
||||
if (result != DragDropEffect.None)
|
||||
if (result != DragDropEffect.None || _dragHandlers == null)
|
||||
return result;
|
||||
|
||||
return _dragHandlers.Effect;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnDragLeave()
|
||||
{
|
||||
_dragHandlers.OnDragLeave();
|
||||
_dragHandlers?.OnDragLeave();
|
||||
|
||||
base.OnDragLeave();
|
||||
}
|
||||
|
||||
@@ -585,7 +585,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
public override DragDropEffect OnDragMove(ref Float2 location, DragData data)
|
||||
{
|
||||
var result = base.OnDragMove(ref location, data);
|
||||
if (result != DragDropEffect.None)
|
||||
if (result != DragDropEffect.None || _dragHandlers == null)
|
||||
return result;
|
||||
|
||||
return _dragHandlers.Effect;
|
||||
@@ -594,7 +594,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
/// <inheritdoc />
|
||||
public override void OnDragLeave()
|
||||
{
|
||||
_dragHandlers.OnDragLeave();
|
||||
_dragHandlers?.OnDragLeave();
|
||||
|
||||
base.OnDragLeave();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user