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
This commit is contained in:
Thomas Pointhuber 2024-05-12 18:30:49 +02:00
parent 3ade85bc8d
commit 21b6b5efbb
1 changed files with 1 additions and 1 deletions

View File

@ -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;