summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJakub Trzebiatowski <ubap.dev@gmail.com>2016-06-07 23:13:44 +0200
committerjan iversen <jani@documentfoundation.org>2016-06-08 06:00:53 +0000
commit05cd178535619d7cfecc15c059a92c2006f9282d (patch)
treecf6bc66cb7dee8c32115769fbbe0f94a95e2020c /sw
parent3fd25d2fd8dd29a2c775dee2781591074f1f8f34 (diff)
sw SwXTextCellStyle fix possible nullptr dereference
Change-Id: Id6303afdbd294066332c1806699a47086331e9ef Reviewed-on: https://gerrit.libreoffice.org/26038 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jakub Trzebiatowski <ubap.dev@gmail.com> Reviewed-by: jan iversen <jani@documentfoundation.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/unocore/unostyle.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 7f73a61af403..b87dfe3f0ff6 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -4468,6 +4468,9 @@ css::uno::Reference<css::style::XStyle> SwXTextCellStyle::CreateXTextCellStyle(S
throw;
SwTableAutoFormat* pFormat = pDocShell->GetDoc()->GetTableStyles().FindAutoFormat(sParentName);
+ if (!pFormat)
+ throw;
+
sal_uInt32 nBoxIndex = rTableTemplateMap[nTemplateIndex];
pBoxFormat = &pFormat->GetBoxFormat(nBoxIndex);
}