summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-11-02 23:51:51 +0100
committerJulien Nabet <serval2412@yahoo.fr>2017-11-03 07:16:20 +0100
commitaa5f6764bd29939f6543c0afa02b21319f2c7c6e (patch)
tree0a2c51687d246204db321027bdacadcfbd0852fd
parent526c8f7240812f857d54dc23398ee7845b0be36d (diff)
tdf#113597: Inserting table in header and saving crashes
test xTextPortionEnumerationAccess before trying to use it bt: 0x00007fffca9201e6 in SwEditShell::CollectAdvancedClassification (this=this@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@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@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r--sw/source/core/edit/edfcol.cxx2
1 files changed, 2 insertions, 0 deletions
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