svx/source/svdraw/svdcrtv.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
New commits: commit f4883ff377369e36ad9f080b0c5f027023707297 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Sep 8 17:55:42 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Sep 8 21:11:50 2022 +0200 tdf#150845 fix crash in writer Form->TextObject regression from commit 8611f6e259b807b4f19c8dc0eab86ca648891ce3 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Thu May 27 10:27:46 2021 +0200 ref-count SdrObject Change-Id: I66370566562a1275c21c24523a505704508d3d09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139703 Tested-by: Noel Grandin <noel.gran...@collabora.co.uk> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx index a73c5fe531af..1aa9d1d2d54e 100644 --- a/svx/source/svdraw/svdcrtv.cxx +++ b/svx/source/svdraw/svdcrtv.cxx @@ -337,14 +337,14 @@ void SdrCreateView::SetCurrentObj(SdrObjKind nIdent, SdrInventor nInvent) { mnCurrentInvent=nInvent; mnCurrentIdent=nIdent; + rtl::Reference<SdrObject> pObj = (nIdent == SdrObjKind::NONE) ? nullptr : + SdrObjFactory::MakeNewObject( + *GetModel(), + nInvent, + nIdent); - if(nIdent != SdrObjKind::NONE) + if(pObj) { - rtl::Reference<SdrObject> pObj = - SdrObjFactory::MakeNewObject( - *GetModel(), - nInvent, - nIdent); // Using text tool, mouse cursor is usually I-Beam, // crosshairs with tiny I-Beam appears only on MouseButtonDown. if(IsTextTool())