From 21b6b5efbb01b7bff5b2db08ab619f9ffb272371 Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Sun, 12 May 2024 18:30:49 +0200 Subject: [PATCH] Do not rely on the existence of a BOARD* object in padNeedsUpdate This allows us to use this check in unit-tests without a board attached --- pcbnew/drc/drc_test_provider_library_parity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/drc/drc_test_provider_library_parity.cpp b/pcbnew/drc/drc_test_provider_library_parity.cpp index b4965ab091..0a8f5f4c51 100644 --- a/pcbnew/drc/drc_test_provider_library_parity.cpp +++ b/pcbnew/drc/drc_test_provider_library_parity.cpp @@ -284,7 +284,7 @@ bool padNeedsUpdate( const PAD* a, const PAD* b, REPORTER* aReporter ) layerSettingsDiffer |= a->GetKeepTopBottom() != b->GetKeepTopBottom(); // Trim layersets to the current board before comparing - LSET enabledLayers = a->GetBoard()->GetEnabledLayers(); + LSET enabledLayers = a->GetBoard() ? a->GetBoard()->GetEnabledLayers() : LSET::AllLayersMask(); LSET aLayers = a->GetLayerSet() & enabledLayers; LSET bLayers = b->GetLayerSet() & enabledLayers;