[Libreoffice-commits] .: Branch 'libreoffice-3-3' - writerfilter/source

Noel Power noelp at kemper.freedesktop.org
Thu Feb 24 13:44:00 PST 2011


 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    3 ++-
 writerfilter/source/dmapper/FormControlHelper.cxx |    2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit d9f989748b178e12294e16e25cad75456859625c
Author: Noel Power <noel.power at novell.com>
Date:   Thu Feb 24 21:42:01 2011 +0000

    fix for fdo#34664 - prevent null pointer access when no ffdata available
    
    Signed-off-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 57b6bcc..77b09eb 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3077,7 +3077,8 @@ void DomainMapper_Impl::CloseFieldCommand()
                     {
                         FFDataHandler::Pointer_t pFFDataHandler
                             (pContext->getFFDataHandler());
-
+                        if ( !pFFDataHandler )
+                            throw uno::RuntimeException();
                         xFieldProperties->setPropertyValue
                             (rPropNameSupplier.GetName(PROP_HINT),
                             uno::makeAny(pFFDataHandler->getStatusText()));
diff --git a/writerfilter/source/dmapper/FormControlHelper.cxx b/writerfilter/source/dmapper/FormControlHelper.cxx
index b47186c..4318567 100644
--- a/writerfilter/source/dmapper/FormControlHelper.cxx
+++ b/writerfilter/source/dmapper/FormControlHelper.cxx
@@ -156,6 +156,8 @@ FormControlHelper::~FormControlHelper()
 bool FormControlHelper::createCheckbox(uno::Reference<text::XTextRange> xTextRange,
                                        const ::rtl::OUString & rControlName)
 {
+    if ( !m_pFFData )
+        return false;
     uno::Reference<lang::XMultiServiceFactory> 
         xServiceFactory(m_pImpl->getServiceFactory());
 


More information about the Libreoffice-commits mailing list