summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-04-21 11:19:45 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-04-21 14:08:20 +0200
commitd757051f1c0c6a1b3239dcf0d1c6c7e20392d20b (patch)
tree43b1f2aa41accec163986d1a132963e56613f449
parent75f5fdbbe48a847874397d9d126f832dbdfada5a (diff)
cid#1476300 Dereference after null check
Change-Id: Ib41b7bd60938aea997187aa3d2d6f9ea319fafc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114391 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--svx/source/svdraw/svdmrkv.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index b5adf79a6b3b..963ee43d65af 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -688,10 +688,10 @@ OUString lcl_getDragParameterString( const OUString& rCID )
bool SdrMarkView::dumpGluePointsToJSON(boost::property_tree::ptree& rTree)
{
bool result = false;
- if (OutputDevice* rOutDev = mpMarkedPV->GetView().GetFirstOutputDevice())
+ if (OutputDevice* pOutDev = mpMarkedPV ? mpMarkedPV->GetView().GetFirstOutputDevice() : nullptr)
{
bool bConvertUnit = false;
- if (rOutDev->GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
+ if (pOutDev->GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
bConvertUnit = true;
const SdrObjList* pOL = mpMarkedPV->GetObjList();
if (!pOL)