Fix crash when a pagelayout includes a bitmap or polygon.

Fixes: lp:1830439
* https://bugs.launchpad.net/kicad/+bug/1830439
This commit is contained in:
Jeff Young 2019-05-25 01:35:04 +01:00
parent 8518c373d1
commit b9898e2bb0
1 changed files with 2 additions and 2 deletions

View File

@ -430,7 +430,7 @@ void WORKSHEET_DATAITEM_POLYPOLYGON::SyncDrawItems( WS_DRAW_ITEM_LIST* aCollecto
const bool fill = true;
int pensize = GetPenSizeUi();
auto poly = new WS_DRAW_ITEM_POLYGON( this, GetStartPosUi( jj ), fill, pensize );
item->SetFlags( itemFlags[ jj ] );
poly->SetFlags( itemFlags[ jj ] );
m_drawItems.push_back( poly );
if( aCollector )
@ -732,7 +732,7 @@ void WORKSHEET_DATAITEM_BITMAP::SyncDrawItems( WS_DRAW_ITEM_LIST* aCollector, KI
continue;
auto bitmap = new WS_DRAW_ITEM_BITMAP( this, GetStartPosUi( jj ) );
item->SetFlags( itemFlags[ jj ] );
bitmap->SetFlags( itemFlags[ jj ] );
m_drawItems.push_back( bitmap );
if( aCollector )