Kaydet (Commit) 9d55ce72 authored tarafından Xisco Fauli's avatar Xisco Fauli Kaydeden (comit) Katarina Behrens

tdf#107877: Don't crash if all bitmaps are deleted

Change-Id: Ie21f8cf1ead7c75017ee09436102f87f5d5dc04c
Reviewed-on: https://gerrit.libreoffice.org/37673Reviewed-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
üst c7c5a96e
...@@ -525,6 +525,8 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyBitmapHdl, ValueSet*, void) ...@@ -525,6 +525,8 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyBitmapHdl, ValueSet*, void)
} }
} }
if(pGraphicObject)
{
BitmapEx aBmpEx(pGraphicObject->GetGraphic().GetBitmapEx()); BitmapEx aBmpEx(pGraphicObject->GetGraphic().GetBitmapEx());
Size aTempBitmapSize = aBmpEx.GetSizePixel(); Size aTempBitmapSize = aBmpEx.GetSizePixel();
const double fUIScale = ( (mpView && mpView->GetModel()) ? double(mpView->GetModel()->GetUIScale()) : 1.0); const double fUIScale = ( (mpView && mpView->GetModel()) ? double(mpView->GetModel()->GetUIScale()) : 1.0);
...@@ -540,6 +542,12 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyBitmapHdl, ValueSet*, void) ...@@ -540,6 +542,12 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyBitmapHdl, ValueSet*, void)
m_pCtlBitmapPreview->SetAttributes( m_aXFillAttr.GetItemSet() ); m_pCtlBitmapPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
m_pCtlBitmapPreview->Invalidate(); m_pCtlBitmapPreview->Invalidate();
}
else
{
SAL_WARN("cui.tabpages", "SvxBitmapTabPage::ModifyBitmapHdl(): null pGraphicObject");
}
} }
IMPL_LINK_NOARG(SvxBitmapTabPage, ClickRenameHdl, SvxPresetListBox*, void) IMPL_LINK_NOARG(SvxBitmapTabPage, ClickRenameHdl, SvxPresetListBox*, void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment