Fix freed pointer access issue (from Coverity scan).

This commit is contained in:
Jeff Young 2020-01-11 00:09:08 +00:00
parent 7bb9551801
commit 0fd68dad62
1 changed files with 5 additions and 0 deletions

View File

@ -108,6 +108,11 @@ void WS_DATA_ITEM::SyncDrawItems( WS_DRAW_ITEM_LIST* aCollector, KIGFX::VIEW* aV
item = new WS_DRAW_ITEM_LINE( this, j, GetStartPosUi( j ), GetEndPosUi( j ), pensize );
else if( m_type == WS_RECT )
item = new WS_DRAW_ITEM_RECT( this, j, GetStartPosUi( j ), GetEndPosUi( j ), pensize );
else
{
wxFAIL_MSG( "Unknown worksheet draw item type" );
continue;
}
item->SetFlags( itemFlags[ j ] );
m_drawItems.push_back( item );