diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-07-01 09:53:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-07-01 12:27:58 +0200 |
commit | 5827376349b01447280ee4391b03a0f149f88ce4 (patch) | |
tree | d09edebb9f17d5e2b09002b8c2412ae39dfeba02 | |
parent | can flatten this a level (diff) | |
download | core-5827376349b01447280ee4391b03a0f149f88ce4.tar.gz core-5827376349b01447280ee4391b03a0f149f88ce4.zip |
Related: ofz#33724 detect earlier if comparison shape has no cshape
Change-Id: I23e2c464ffda5de892ae78a188b4c25b81b61fd7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118213
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | hwpfilter/source/hwpfile.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx index 29f25cb39e08..762bb31d0582 100644 --- a/hwpfilter/source/hwpfile.cxx +++ b/hwpfilter/source/hwpfile.cxx @@ -633,6 +633,8 @@ int HWPFile::compareParaShape(const ParaShape* shape) for (int i = 0; i < count; ++i) { ParaShape *pshape = pslist[i].get(); + if (!pshape->cshape) + continue; if (shape->left_margin == pshape->left_margin && shape->right_margin == pshape->right_margin && shape->pspacing_prev == pshape->pspacing_prev && @@ -643,8 +645,7 @@ int HWPFile::compareParaShape(const ParaShape* shape) shape->outline == pshape->outline && shape->pagebreak == pshape->pagebreak) { - if (pshape->cshape && - shape->cshape->size == pshape->cshape->size && + if (shape->cshape->size == pshape->cshape->size && shape->cshape->font[0] == pshape->cshape->font[0] && shape->cshape->ratio[0] == pshape->cshape->ratio[0] && shape->cshape->space[0] == pshape->cshape->space[0] && |