[Libreoffice-commits] core.git: sw/source

Julien Nabet serval2412 at yahoo.fr
Fri Nov 3 06:16:50 UTC 2017


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

New commits:
commit aa5f6764bd29939f6543c0afa02b21319f2c7c6e
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Thu Nov 2 23:51:51 2017 +0100

    tdf#113597: Inserting table in header and saving crashes
    
    test xTextPortionEnumerationAccess before trying to use it
    bt:
    0x00007fffca9201e6 in SwEditShell::CollectAdvancedClassification (this=this at entry=0x55555790c710) at /home/user/libreoffice/sw/source/core/edit/edfcol.cxx:804
    804             uno::Reference<container::XEnumeration> xTextPortions = xTextPortionEnumerationAccess->createEnumeration();
    0  0x00007fffca9201e6 in SwEditShell::CollectAdvancedClassification() (this=this at entry=0x55555790c710) at /home/user/libreoffice/sw/source/core/edit/edfcol.cxx:804
    1  0x00007fffca927e8c in SwEditShell::ClassifyDocPerHighestParagraphClass() (this=0x55555790c710) at /home/user/libreoffice/sw/source/core/edit/edfcol.cxx:1722
    
    Regression from b480d5e4c03438487b645ae10347c5c22f36bb25
    
    Change-Id: I255165ca2aa8e701fe011812165b32dd17e4e2ec
    Reviewed-on: https://gerrit.libreoffice.org/44240
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 3b9a466e660e..fdc88456f822 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -801,6 +801,8 @@ std::vector<svx::ClassificationResult> SwEditShell::CollectAdvancedClassificatio
     while (xParagraphs->hasMoreElements())
     {
         uno::Reference<container::XEnumerationAccess> xTextPortionEnumerationAccess(xParagraphs->nextElement(), uno::UNO_QUERY);
+        if (!xTextPortionEnumerationAccess.is())
+            continue;
         uno::Reference<container::XEnumeration> xTextPortions = xTextPortionEnumerationAccess->createEnumeration();
 
         // Check font weight


More information about the Libreoffice-commits mailing list