diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xcl97/xcl97rec.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index 84718321b126..8f930c80993b 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -241,12 +241,17 @@ void SaveDrawingMLObjects( XclExpObjList& rList, XclExpXmlStream& rStrm ) else --nSkipObj; + XclObjAny* pObj = nullptr; if (rxObj->GetObjType() == 0) // group (it can be a subgroup) + pObj = dynamic_cast<XclObjAny*>(rxObj.get()); + if (pObj) { - XclObjAny* pObj = dynamic_cast<XclObjAny*>(rxObj.get()); - css::uno::Reference<css::drawing::XShapes> mXShapes(pObj->GetShape(), UNO_QUERY); - // skip (also) the objects of this group - nSkipObj += mXShapes->getCount(); + css::uno::Reference<css::drawing::XShapes> xShapes(pObj->GetShape(), UNO_QUERY); + if (xShapes) + { + // skip (also) the objects of this group + nSkipObj += xShapes->getCount(); + } } } |