Fix missing initialization of colors settings of a board, when created by a python script.
A pointer was not initialized, therefore plots from a python script sometimes crash. Fixes: lp:1721166 https://bugs.launchpad.net/kicad/+bug/1721166
This commit is contained in:
@@ -57,8 +57,12 @@
|
||||
COLOR4D BRDITEMS_PLOTTER::getColor( LAYER_NUM aLayer )
|
||||
{
|
||||
COLOR4D color = m_board->Colors().GetLayerColor( ToLAYER_ID( aLayer ) );
|
||||
|
||||
// A hack to avoid plotting ahite itmen in white color, expecting the paper
|
||||
// is also white: use a non white color:
|
||||
if( color == COLOR4D::WHITE )
|
||||
color = COLOR4D( LIGHTGRAY );
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user