diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-11-22 20:13:13 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-11-23 09:51:28 +0100 |
commit | 59d985bbcdf760a368f1dd2edb0926a60e99db12 (patch) | |
tree | ef6bcf133f08e94c2efcf35474027d6f42a8c10e | |
parent | 5fc6a601d7a1978db291fd0f7dcec638a7c25651 (diff) |
ofz#27756 null deref
Change-Id: Iccbd368a69f86abe7c7c72df8158db98eaf2bc58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106362
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | lotuswordpro/source/filter/lwpcelllayout.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwpcelllayout.cxx b/lotuswordpro/source/filter/lwpcelllayout.cxx index cd8d49d7519b..71d0bce8a943 100644 --- a/lotuswordpro/source/filter/lwpcelllayout.cxx +++ b/lotuswordpro/source/filter/lwpcelllayout.cxx @@ -66,6 +66,8 @@ #include <lwpfilehdr.hxx> #include <lwpglobalmgr.hxx> +#include <sal/log.hxx> + #include <xfilter/xfstylemanager.hxx> #include <xfilter/xfcell.hxx> #include <xfilter/xfcellstyle.hxx> @@ -345,7 +347,11 @@ LwpPara* LwpCellLayout::GetLastParaOfPreviousStory() if (pPreStoryID && !(pPreStoryID->IsNull())) { LwpStory* pPreStory = dynamic_cast<LwpStory*>(pPreStoryID->obj(VO_STORY).get()); - assert(pPreStory); + if (!pPreStory) + { + SAL_WARN("lwp", "unexpected null VO_STORY"); + return nullptr; + } return dynamic_cast<LwpPara*>(pPreStory->GetLastPara().obj(VO_PARA).get()); } else |