diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx index 91a475f63468..919400191f52 100644 --- a/oox/source/drawingml/diagram/diagram.cxx +++ b/oox/source/drawingml/diagram/diagram.cxx @@ -340,7 +340,8 @@ void Diagram::addTo( const ShapePtr & pParentShape ) // create Shape hierarchy ShapeCreationVisitor aCreationVisitor(pParentShape, *this); - mpLayout->getNode()->accept(aCreationVisitor); + if( mpLayout->getNode() ) + mpLayout->getNode()->accept( aCreationVisitor ); } OUString Diagram::getLayoutId() const