xmloff/source/core/xmlimp.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit d30810b5a116816fe8a6d3341aa98e43adc56de2
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Jul 4 14:08:53 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Jul 4 15:37:36 2022 +0200

    dont instantiate TextImport unless we need it
    
    speeds up loading XColorList and related UI elements
    
    Change-Id: I737137669afea8a70dfefa78cf9f8a325d16fbcb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136806
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 3d9cb9f1edb1..873f557f8982 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -598,7 +598,8 @@ void SAL_CALL SvXMLImport::endDocument()
     //  #i9518# All the stuff that accesses the document has to be done here, 
not in the dtor,
     //  because the SvXMLImport dtor might not be called until after the 
document has been closed.
 
-    GetTextImport()->MapCrossRefHeadingFieldsHorribly();
+    if (mxTextImport)
+        mxTextImport->MapCrossRefHeadingFieldsHorribly();
 
     if (mpImpl->mpRDFaHelper)
     {

Reply via email to