From 5f45c2c0d1791867445e0d8b01ac403a5f782827 Mon Sep 17 00:00:00 2001
From: Jeff Young <jeff@rokeby.ie>
Date: Wed, 15 Jan 2025 16:06:09 +0000
Subject: [PATCH] Nullptr fixes.

---
 pcbnew/drc/drc_test_provider_copper_clearance.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pcbnew/drc/drc_test_provider_copper_clearance.cpp b/pcbnew/drc/drc_test_provider_copper_clearance.cpp
index 039c594275..15734a79a4 100644
--- a/pcbnew/drc/drc_test_provider_copper_clearance.cpp
+++ b/pcbnew/drc/drc_test_provider_copper_clearance.cpp
@@ -283,7 +283,9 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testSingleLayerItemAgainstItem( BOARD_I
                 std::shared_ptr<DRC_ITEM> drce = DRC_ITEM::Create( DRCE_SHORTING_ITEMS );
                 wxString msg;
 
-                msg.Printf( _( "(nets %s and %s)" ), net->GetNetname(), otherNet->GetNetname() );
+                msg.Printf( _( "(nets %s and %s)" ),
+                            net ? net->GetNetname() : _( "<no net>" ),
+                            otherNet ? otherNet->GetNetname() : _( "<no net>" ) );
 
                 drce->SetErrorMessage( drce->GetErrorText() + wxS( " " ) + msg );
                 drce->SetItems( item, other );