writerfilter/source/dmapper/DomainMapper_Impl.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 16f5d0504c3385a746c8936318d55082ce30998d
Author: Caolán McNamara <caol...@redhat.com>
Date:   Fri Apr 11 11:10:14 2014 +0100

    check that stacks are not empty before top()
    
    Change-Id: Iad5b3381b8201c5ac32a5bdf99bd3d5872ea3afc
    (cherry picked from commit a1ea3838adee634ccf725bc5f2be7805c6294a16)
    Reviewed-on: https://gerrit.libreoffice.org/8933
    Tested-by: Michael Stahl <mst...@redhat.com>
    Reviewed-by: Michael Stahl <mst...@redhat.com>
    (cherry picked from commit 1a8d06881ee7ba679da8b7cc37b53a20a04ee3e8)
    Reviewed-on: https://gerrit.libreoffice.org/9127
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index b0cde8d..21416e2 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1242,6 +1242,9 @@ void DomainMapper_Impl::appendTextContent(
     const uno::Sequence< beans::PropertyValue > xPropertyValues
     )
 {
+    SAL_WARN_IF(m_aTextAppendStack.empty(), "writerfilter.dmapper", "no text 
append stack");
+    if (m_aTextAppendStack.empty())
+        return;
     uno::Reference< text::XTextAppendAndConvert >  xTextAppendAndConvert( 
m_aTextAppendStack.top().xTextAppend, uno::UNO_QUERY );
     OSL_ENSURE( xTextAppendAndConvert.is(), "trying to append a text content 
without XTextAppendAndConvert" );
     if(xTextAppendAndConvert.is() && ! getTableManager( ).isIgnore())
@@ -1291,7 +1294,9 @@ void DomainMapper_Impl::appendOLE( const OUString& 
rStreamName, OLEHandlerPtr pO
         // gives a better ( visually ) result
         
xOLEProperties->setPropertyValue(PropertyNameSupplier::GetPropertyNameSupplier().GetName(
 PROP_ANCHOR_TYPE ),  uno::makeAny( text::TextContentAnchorType_AS_CHARACTER ) 
);
         // remove ( if valid ) associated shape ( used for graphic replacement 
)
-        m_aAnchoredStack.top( ).bToRemove = true;
+        SAL_WARN_IF(m_aAnchoredStack.empty(), "writerfilter.dmapper", "no 
anchor stack");
+        if (!m_aAnchoredStack.empty())
+            m_aAnchoredStack.top( ).bToRemove = true;
         RemoveLastParagraph();
         m_aTextAppendStack.pop();
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to