svx/source/toolbars/fontworkbar.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit f10b7e820844d94b4dbec3dcaf24392275940914 Author: Michael Meeks <[email protected]> AuthorDate: Fri Nov 2 19:14:05 2018 +0000 Commit: Markus Mohrhard <[email protected]> CommitDate: Thu Nov 8 07:11:20 2018 +0100 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 <[email protected]> diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx index 90b05316fdc0..290c1f746fe4 100644 --- a/svx/source/toolbars/fontworkbar.cxx +++ b/svx/source/toolbars/fontworkbar.cxx @@ -340,7 +340,10 @@ static void GetGeometryForCustomShape( SdrCustomShapeGeometryItem& rGeometryItem 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_; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
