diff --git a/ProjectAirFighter/ProjectAirFighter/FormWarPlaneConfig.cs b/ProjectAirFighter/ProjectAirFighter/FormWarPlaneConfig.cs index 71fc646..ae3c00f 100644 --- a/ProjectAirFighter/ProjectAirFighter/FormWarPlaneConfig.cs +++ b/ProjectAirFighter/ProjectAirFighter/FormWarPlaneConfig.cs @@ -156,10 +156,12 @@ public partial class FormWarPlaneConfig : Form } private void labelAdditionalColor_DragEnter(object sender, DragEventArgs e) { - if (e.Data.GetDataPresent(typeof(Color))) + if (_warPlane?.EntityWarPlane is EntityAirFighter _airFighter) { + if (e.Data.GetDataPresent(typeof(Color))) e.Effect = DragDropEffects.Copy; else e.Effect = DragDropEffects.None; + } } private void buttonAdd_Click(object sender, EventArgs e)