[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - oox/source
Caolán McNamara
caolanm at redhat.com
Thu Apr 5 14:17:49 UTC 2018
oox/source/ole/vbacontrol.cxx | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit 713a85d9a315b4fa84e1c5704bcb9c4f7457d113
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Mar 26 09:32:14 2018 +0100
forcepoint #31 survive missing control model
Change-Id: I37e4af560b46b4f6d9e0b87fe58493818f366d3c
Reviewed-on: https://gerrit.libreoffice.org/51877
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
index 2c65f3c75545..1d92be8eace3 100644
--- a/oox/source/ole/vbacontrol.cxx
+++ b/oox/source/ole/vbacontrol.cxx
@@ -431,7 +431,13 @@ void VbaFormControl::importStorage( StorageBase& rStrg, const AxClassTable& rCla
for ( ; it != it_end; ++it )
{
- if ( (*it)->mxCtrlModel->getControlType() == API_CONTROL_PAGE )
+ auto& elem = (*it)->mxCtrlModel;
+ if (!elem)
+ {
+ SAL_WARN("oox", "empty control model");
+ continue;
+ }
+ if (elem->getControlType() == API_CONTROL_PAGE)
{
VbaSiteModelRef xPageSiteRef = (*it)->mxSiteModel;
if ( xPageSiteRef.get() )
@@ -439,7 +445,7 @@ void VbaFormControl::importStorage( StorageBase& rStrg, const AxClassTable& rCla
}
else
{
- AxTabStripModel* pTabStrip = static_cast<AxTabStripModel*> ( (*it)->mxCtrlModel.get() );
+ AxTabStripModel* pTabStrip = static_cast<AxTabStripModel*>(elem.get());
sCaptions = pTabStrip->maItems;
pMultiPage->mnActiveTab = pTabStrip->mnListIndex;
pMultiPage->mnTabStyle = pTabStrip->mnTabStyle;
More information about the Libreoffice-commits
mailing list