[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sfx2/source

Michael Stahl mstahl at redhat.com
Tue Jun 27 20:45:36 UTC 2017


 sfx2/source/sidebar/ResourceManager.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 622d2b4c250f6c3cc67f10887f3e3ec9db3f69a5
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Jun 27 17:32:16 2017 +0200

    tdf#108814 sfx2: fix crash in sidebar when XUpdateModel not implemented
    
    com.sun.star.ui.XUpdateModel was added in 5.1 so pre-existing extensions
    don't implement it.
    
    (regression from 0635208edf1cdee4235ea87666a473ac81007555)
    
    Change-Id: I6749a9cf2fc82b9cd90d85a682247104e369e167
    (cherry picked from commit d109948f0dd4190d7aca1e0fa7e2706ef3f40a6c)
    Reviewed-on: https://gerrit.libreoffice.org/39312
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx
index d6a51a01f2e9..57aa237a4194 100644
--- a/sfx2/source/sidebar/ResourceManager.cxx
+++ b/sfx2/source/sidebar/ResourceManager.cxx
@@ -719,7 +719,10 @@ void ResourceManager::UpdateModel(const css::uno::Reference<css::frame::XModel>&
         for (SharedPanelContainer::const_iterator it = rContainer.begin(); it != rContainer.end(); ++it)
         {
             css::uno::Reference<css::ui::XUpdateModel> xPanel((*it)->GetPanelComponent(), css::uno::UNO_QUERY);
-            xPanel->updateModel(xModel);
+            if (xPanel.is()) // tdf#108814 interface is optional
+            {
+                xPanel->updateModel(xModel);
+            }
         }
     }
 }


More information about the Libreoffice-commits mailing list