fdo#80280 Don't add items with no bitmaps

Change-Id: I625aff5d2dcae0b1491fa77b04605d4579ec8530
This commit is contained in:
Maxim Monastirsky
2014-11-18 01:24:31 +02:00
parent 7ad6eb2c9b
commit cf26921658

View File

@@ -4887,17 +4887,20 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( vcl::Window *pWindow,
if ( graphics.getLength() > 0 )
{
Image img = Image( graphics[ 0 ] );
pTbSymbol->InsertItem( nId, img, pConstIter->first );
if ( !img.GetBitmapEx().IsEmpty() )
{
pTbSymbol->InsertItem( nId, img, pConstIter->first );
uno::Reference< graphic::XGraphic > xGraphic = graphics[ 0 ];
uno::Reference< graphic::XGraphic > xGraphic = graphics[ 0 ];
if ( xGraphic.is() )
xGraphic->acquire();
if ( xGraphic.is() )
xGraphic->acquire();
pTbSymbol->SetItemData(
nId, static_cast< void * > ( xGraphic.get() ) );
pTbSymbol->SetItemData(
nId, static_cast< void * > ( xGraphic.get() ) );
++nId;
++nId;
}
}
++pConstIter;