From e530bab396de8f8bc451ecc222410a9f42e15cdf Mon Sep 17 00:00:00 2001
From: Jeff Young <jeff@rokeby.ie>
Date: Mon, 27 Jan 2025 19:07:07 +0000
Subject: [PATCH] Don't report "shorting nets" when one pad has no net.

(Fall back to clearance violation instead.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19752
---
 pcbnew/drc/drc_test_provider_copper_clearance.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pcbnew/drc/drc_test_provider_copper_clearance.cpp b/pcbnew/drc/drc_test_provider_copper_clearance.cpp
index 15734a79a4..aaf0a90253 100644
--- a/pcbnew/drc/drc_test_provider_copper_clearance.cpp
+++ b/pcbnew/drc/drc_test_provider_copper_clearance.cpp
@@ -874,7 +874,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem( PAD* pad, SHAPE* pa
                     // Pads connected to pads of a net-tie footprint are allowed to collide
                     // with the net-tie footprint's graphics.
                 }
-                else if( actual == 0 && otherNet && testShorting )
+                else if( actual == 0 && padNet && otherNet && testShorting )
                 {
                     std::shared_ptr<DRC_ITEM> drce = DRC_ITEM::Create( DRCE_SHORTING_ITEMS );
                     wxString msg;