summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/ole/vbaexport.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index d6e2b4f68440..10c0d21c06bc 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -769,6 +769,9 @@ void exportPROJECTwmStream(SvStream& rStrm, const css::uno::Sequence<OUString>&
void VbaExport::exportVBA(SotStorage* pRootStorage)
{
css::uno::Reference<css::container::XNameContainer> xNameContainer = getBasicLibrary();
+ if (!xNameContainer.is()) {
+ return;
+ }
css::uno::Sequence<OUString> aElementNames = xNameContainer->getElementNames();
sal_Int32 n = aElementNames.getLength(); // get the number of modules