Fix deselecting error

This commit is contained in:
Wojtek Figat
2024-03-19 21:47:00 +01:00
parent 6b35c0a161
commit d6f0062198

View File

@@ -101,7 +101,10 @@ namespace FlaxEditor.Modules
public void Select(List<SceneGraphNode> selection, bool additive = false)
{
if (selection == null)
throw new ArgumentNullException();
{
Deselect();
return;
}
// Prevent from selecting null nodes
selection.RemoveAll(x => x == null);