summaryrefslogtreecommitdiff
path: root/xmloff/source/forms/elementimport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/forms/elementimport.cxx')
-rw-r--r--xmloff/source/forms/elementimport.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index 7f5688e869..99ce71fffd 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -252,7 +252,9 @@ namespace xmloff
m_sName = implGetDefaultName();
}
- m_xParentContainer->insertByName(m_sName, makeAny(m_xElement));
+ if (m_xParentContainer.is())
+ m_xParentContainer->insertByName(m_sName, makeAny(m_xElement));
+
LEAVE_LOG_CONTEXT( );
}