chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx | 2 ++ include/svx/dlgctl3d.hxx | 1 + svx/source/dialog/dlgctl3d.cxx | 5 +++++ 3 files changed, 8 insertions(+)
New commits: commit 289772c27fd523df545262614fb31d90314326df Author: Caolán McNamara <[email protected]> AuthorDate: Sat Mar 2 21:24:20 2024 +0000 Commit: Adolfo Jayme Barrientos <[email protected]> CommitDate: Sun Mar 3 20:41:42 2024 +0100 Resolves: tdf#159879 Crash when closing "3D View" dialog Change-Id: I9c116007afe9cea97b597933ad8483dce25c3707 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164274 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <[email protected]> diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx index 2020365fd12f..3d7d2f327d65 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx @@ -251,6 +251,8 @@ ThreeD_SceneIllumination_TabPage::ThreeD_SceneIllumination_TabPage(weld::Contain ThreeD_SceneIllumination_TabPage::~ThreeD_SceneIllumination_TabPage() { + // drop page view before the widget it paints to is destroyed + m_xPreview->ClearPageView(); } IMPL_LINK_NOARG(ThreeD_SceneIllumination_TabPage, fillControlsFromModel, void*, void) diff --git a/include/svx/dlgctl3d.hxx b/include/svx/dlgctl3d.hxx index 16873e7b3e17..191b9b413a02 100644 --- a/include/svx/dlgctl3d.hxx +++ b/include/svx/dlgctl3d.hxx @@ -61,6 +61,7 @@ public: SvxPreviewObjectType GetObjectType() const { return mnObjectType; } SfxItemSet const & Get3DAttributes() const; virtual void Set3DAttributes(const SfxItemSet& rAttr); + void ClearPageView(); }; class SAL_WARN_UNUSED SVX_DLLPUBLIC Svx3DLightControl final : public Svx3DPreviewControl diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index e315819b06f5..319b0a2d7805 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -58,6 +58,11 @@ void Svx3DPreviewControl::SetDrawingArea(weld::DrawingArea* pDrawingArea) Construct(); } +void Svx3DPreviewControl::ClearPageView() +{ + mp3DView->ClearPageView(); +} + Svx3DPreviewControl::~Svx3DPreviewControl() { mp3DObj.clear();
