summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-08-31 13:16:25 +0100
committerAndras Timar <andras.timar@collabora.com>2017-09-01 16:17:25 +0200
commitbe03a9c4b2fb4d320379b8f221320d652df701a5 (patch)
treee18e27a923703b4206c53ef994f93c45b7fe5f0c /xmloff
parent6d3c174ce7fcd21ec7f080c68399ca147f3fbec0 (diff)
Resolves: tdf#112123 check m_xAutoStyles like in similar methods
Change-Id: I099da789a0e64fd862d09bb462ccb699e1dc8b9f Reviewed-on: https://gerrit.libreoffice.org/41753 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 3576aa7a7328b04faf222451d73681db7c1d9c54)
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/text/txtimp.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 4d1b1333d9d2..ddb51718bf9f 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -2430,6 +2430,9 @@ SvXMLImportContext *XMLTextImportHelper::CreateTableChildContext(
sal_Int32 XMLTextImportHelper::GetDataStyleKey(const OUString& sStyleName,
bool* pIsSystemLanguage )
{
+ if (!m_xImpl->m_xAutoStyles.is())
+ return -1;
+
const SvXMLStyleContext* pStyle =
static_cast<SvXMLStylesContext *>(m_xImpl->m_xAutoStyles.get())->
FindStyleChildContext( XML_STYLE_FAMILY_DATA_STYLE,