summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdcrtv.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/svdraw/svdcrtv.cxx')
-rw-r--r--svx/source/svdraw/svdcrtv.cxx12
1 files changed, 6 insertions, 6 deletions
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())