From d4b5b6739f5dbc3fffb8d68ae88727047ca527be Mon Sep 17 00:00:00 2001 From: MayNL Date: Mon, 22 Jun 2026 17:37:56 -0400 Subject: [PATCH] Fix crash when drag dropping files without a present node --- PCK-Studio/Controls/Editor/PckEditor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PCK-Studio/Controls/Editor/PckEditor.cs b/PCK-Studio/Controls/Editor/PckEditor.cs index 0691e3c2..840d87f0 100644 --- a/PCK-Studio/Controls/Editor/PckEditor.cs +++ b/PCK-Studio/Controls/Editor/PckEditor.cs @@ -1228,7 +1228,7 @@ namespace PckStudio.Controls string baseDirectory = Path.GetDirectoryName(filesDropped.First()); - string finalDropPath = targetNode.Tag != null ? Path.GetDirectoryName(targetNode?.FullPath) : targetNode?.FullPath; + string finalDropPath = targetNode != null ? (targetNode.Tag != null ? Path.GetDirectoryName(targetNode?.FullPath) : targetNode?.FullPath) : ""; IEnumerable importPaths = files.Concat(directoryFiles);