diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2018-11-02 19:14:05 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2019-01-17 13:39:58 +0100 |
commit | f2c858885244d640e3cced7d7328fd25b39069f2 (patch) | |
tree | 23841731944b4eae3b977781525fdc1f7ae8579c /svx | |
parent | 0d458225e0133eac4a50708026e4150a8a4d0c7a (diff) |
tdf#119648 - even if we fail to import a fontwork, we shouldn't crash.
Change-Id: Id2dcfb69ad8440ea63564334a5a26a5f9b9bde14
Reviewed-on: https://gerrit.libreoffice.org/62789
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
(cherry picked from commit f10b7e820844d94b4dbec3dcaf24392275940914)
Reviewed-on: https://gerrit.libreoffice.org/63061
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 640ae4bf97530882614796aed669be8c4fd91fe4)
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/toolbars/fontworkbar.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx index af8117c7f7d2..49415b632cf4 100644 --- a/svx/source/toolbars/fontworkbar.cxx +++ b/svx/source/toolbars/fontworkbar.cxx @@ -358,7 +358,10 @@ void GetGeometryForCustomShape( SdrCustomShapeGeometryItem& rGeometryItem, const rPool.FreezeIdRanges(); if ( GalleryExplorer::GetSdrObj( GALLERY_THEME_POWERPOINT, i, &aFormModel ) ) { - const SdrObject* pSourceObj = aFormModel.GetPage( 0 )->GetObj( 0 ); + const SdrObject* pSourceObj = nullptr; + if (aFormModel.GetPageCount() > 0) + pSourceObj = aFormModel.GetPage( 0 )->GetObj( 0 ); + SAL_WARN_IF(!pSourceObj, "svx.form", "No content in gallery custom shape '" << rCustomShape << "'" ); if( pSourceObj ) { PropertyValue aPropVal_; |