sw/source/core/edit/edfcol.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit e01c6a3ba7c0e6a089769187ee1ad241aa862280
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Sun May 28 17:15:08 2017 +0200

    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 <vmik...@collabora.co.uk>
    Tested-by: Jenkins <c...@libreoffice.org>

diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 16b2dcaf7689..8d6965c151bb 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())
         {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to