summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmloff/source/draw/shapeexport.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 13e8ef9decde..0116c610a5c6 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -389,11 +389,16 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
// Shapes with a Writer TextBox always have a parent style.
// If there would be none, then just assign the first available.
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(GetExport().GetModel(), uno::UNO_QUERY);
- uno::Reference<container::XNameAccess> xStyleFamilies = xStyleFamiliesSupplier->getStyleFamilies();
- uno::Reference<container::XNameAccess> xFrameStyles = xStyleFamilies->getByName("FrameStyles").get< uno::Reference<container::XNameAccess> >();
- uno::Sequence<OUString> aFrameStyles = xFrameStyles->getElementNames();
- if (aFrameStyles.hasElements())
- aParentName = aFrameStyles[0];
+ if (xStyleFamiliesSupplier.is()) // tdf#108231
+ {
+ uno::Reference<container::XNameAccess> xStyleFamilies = xStyleFamiliesSupplier->getStyleFamilies();
+ uno::Reference<container::XNameAccess> xFrameStyles = xStyleFamilies->getByName("FrameStyles").get< uno::Reference<container::XNameAccess> >();
+ uno::Sequence<OUString> aFrameStyles = xFrameStyles->getElementNames();
+ if (aFrameStyles.hasElements())
+ {
+ aParentName = aFrameStyles[0];
+ }
+ }
}
// filter propset