summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-02-29 18:11:13 +0100
committerMichael Stahl <mstahl@redhat.com>2016-02-29 21:36:29 +0100
commit86df8242b522c4d52817f163c5fa2453923d69f0 (patch)
tree0f676702213737a0fd0b7f6684df89051abfe2bb /svx
parentbd95b5e2857b6e8f1f74a3c0bc3059056ae726d6 (diff)
svx: avoid instantiating OBJ_NONE (SdrObject)
This happens when using the Drawing toolbar in Writer, the "Text Box" button. SdrCreateView::SetCurrentObj() already has the right fallback code in the "else" branch. Change-Id: Icddfa77ce10eddbfb2dc7165ce11ac6dec80b1ee
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdcrtv.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 90ee92ffe465..7b070cbcc108 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -357,7 +357,8 @@ void SdrCreateView::SetCurrentObj(sal_uInt16 nIdent, sal_uInt32 nInvent)
{
nAktInvent=nInvent;
nAktIdent=nIdent;
- SdrObject* pObj = SdrObjFactory::MakeNewObject(nInvent,nIdent,nullptr);
+ SdrObject * pObj = (nIdent == OBJ_NONE) ? nullptr :
+ SdrObjFactory::MakeNewObject(nInvent, nIdent, nullptr);
if(pObj)
{