From 99a04c25a43131104a6ca8bc74a68d12e4b2d67c Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Sat, 20 Apr 2024 22:29:11 +0200 Subject: [PATCH] MainForm(Drag'n Drag) - Fix target node being null --- PCK-Studio/MainForm.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PCK-Studio/MainForm.cs b/PCK-Studio/MainForm.cs index a4010b49..d83e34d1 100644 --- a/PCK-Studio/MainForm.cs +++ b/PCK-Studio/MainForm.cs @@ -1445,6 +1445,9 @@ namespace PckStudio // Retrieve the node at the drop location. TreeNode targetNode = treeViewMain.GetNodeAt(targetPoint); + if (targetNode is null) + return; + bool isTargetPckFile = targetNode.IsTagOfType(); if (e.Data.GetData(dataFormat) is not TreeNode draggedNode)