Null pointer safety (from Coverity).
This commit is contained in:
parent
f57cd91cb3
commit
3b18fa84bf
|
@ -755,6 +755,12 @@ void WS_DATA_ITEM_BITMAP::SyncDrawItems( WS_DRAW_ITEM_LIST* aCollector, KIGFX::V
|
|||
delete item;
|
||||
}
|
||||
|
||||
if( aCollector )
|
||||
{
|
||||
double pix_size_iu = aCollector->GetMilsToIUfactor() * 1000 / m_ImageBitmap->GetPPI();
|
||||
m_ImageBitmap->SetPixelSizeIu( pix_size_iu );
|
||||
}
|
||||
|
||||
m_drawItems.clear();
|
||||
|
||||
for( int j = 0; j < m_RepeatCount; j++ )
|
||||
|
@ -762,9 +768,6 @@ void WS_DATA_ITEM_BITMAP::SyncDrawItems( WS_DRAW_ITEM_LIST* aCollector, KIGFX::V
|
|||
if( j && !IsInsidePage( j ) )
|
||||
continue;
|
||||
|
||||
double pix_size_iu = aCollector->GetMilsToIUfactor() * 1000 / m_ImageBitmap->GetPPI();
|
||||
m_ImageBitmap->SetPixelSizeIu( pix_size_iu );
|
||||
|
||||
WS_DRAW_ITEM_BITMAP* bitmap = new WS_DRAW_ITEM_BITMAP( this, j, GetStartPosUi( j ) );
|
||||
|
||||
bitmap->SetFlags( itemFlags[ j ] );
|
||||
|
|
Loading…
Reference in New Issue