diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-11-16 16:40:33 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-11-16 20:24:33 +0100 |
commit | 31fd3641b363c81ab23e10e6425a39e27a224c3d (patch) | |
tree | 3d7530842bb05970616b30866c2607aaca64014b /chart2/source/controller | |
parent | 591c305541306d41d3777ad5e2c92f875072e2d9 (diff) |
cid#1453998 Wrapper object use after free
Change-Id: I1dc733e72ba63db1eaa20113a7599ea7580eef31
Reviewed-on: https://gerrit.libreoffice.org/82988
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'chart2/source/controller')
-rw-r--r-- | chart2/source/controller/dialogs/dlg_CreationWizard.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx index ccf2cdc5221f..2bdedc962856 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx @@ -68,6 +68,10 @@ CreationWizard::CreationWizard(weld::Window* pParent, const uno::Reference<frame declarePath(PATH_FULL, aPath); + m_pTemplateProvider = static_cast<ChartTypeTabPage*>(GetOrCreatePage(STATE_CHARTTYPE)); + assert(m_pTemplateProvider && "must exist"); + m_pDialogModel->setTemplate(m_pTemplateProvider->getCurrentTemplate()); + SetRoadmapHelpId(HID_SCH_WIZARD_ROADMAP); if (!m_pDialogModel->getModel().isDataFromSpreadsheet()) @@ -97,9 +101,6 @@ std::unique_ptr<BuilderPage> CreationWizard::createPage(WizardState nState) { m_aTimerTriggeredControllerLock.startTimer(); xRet = std::make_unique<ChartTypeTabPage>(pPageContainer, this, m_xChartModel); - m_pTemplateProvider = static_cast<ChartTypeTabPage*>(xRet.get()); - if (m_pDialogModel) - m_pDialogModel->setTemplate( m_pTemplateProvider->getCurrentTemplate()); break; } case STATE_SIMPLE_RANGE: |