diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-05-28 17:15:08 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-06-06 14:03:51 +0200 |
commit | c325057e7ad89e3286bc54b04fb4221be868a69f (patch) | |
tree | 492fe3656be2aa6be681a91a1852dc0314531575 | |
parent | 2a04bf86d9e8f5e04115780d2cae6322b52ef522 (diff) |
Related: tdf#106950 sw: fix crash on opening this file
Not every paragraph supports the container::XEnumerationAccess
interface.
Change-Id: I0690f2e631f733b8f478a7df30d2918400eccf2f
Reviewed-on: https://gerrit.libreoffice.org/38111
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
(cherry picked from commit e01c6a3ba7c0e6a089769187ee1ad241aa862280)
-rw-r--r-- | sw/source/core/edit/edfcol.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 1627ce0bd8d9..82256317bb20 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -124,6 +124,9 @@ uno::Reference<drawing::XShape> lcl_getWatermark(const uno::Reference<text::XTex while (xParagraphs->hasMoreElements()) { uno::Reference<container::XEnumerationAccess> xTextPortionEnumerationAccess(xParagraphs->nextElement(), uno::UNO_QUERY); + if (!xTextPortionEnumerationAccess.is()) + continue; + uno::Reference<container::XEnumeration> xTextPortions = xTextPortionEnumerationAccess->createEnumeration(); while (xTextPortions->hasMoreElements()) { |