summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-06-27 17:32:16 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-06-27 22:45:14 +0200
commit830feb5ecfd041c52a118d51f56b26f65a77712e (patch)
tree511d822c2b286a4c3a151321a569df3992e9e247
parent4c188f4874940441643e97a2ca47c5f21e48e1dc (diff)
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/39311 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sfx2/source/sidebar/ResourceManager.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx
index adbedece1695..140190228f01 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);
+ }
}
}
}