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:
jean-pierre charras
2017-10-08 16:21:27 +02:00
parent d6c0d320db
commit 246f8cae24
3 changed files with 15 additions and 4 deletions
+4
View File
@@ -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;
}