summaryrefslogtreecommitdiff
path: root/registry
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-06 13:27:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-07 07:56:39 +0100
commit2e2d736ccbb21daae91603732c87d5375ede1b47 (patch)
tree6621e351d38dff77dc16c6413767f4baa3c76326 /registry
parent1647bc1309dcd313dff2614f4844b71b1c558dee (diff)
loplugin:collapseif in framework..sal
Change-Id: I3068b18f5cff024a48a8f8c68d69cadad30fe4d5 Reviewed-on: https://gerrit.libreoffice.org/62953 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'registry')
-rw-r--r--registry/source/registry.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/registry/source/registry.cxx b/registry/source/registry.cxx
index 61b2c7ba1445..b183f634eb97 100644
--- a/registry/source/registry.cxx
+++ b/registry/source/registry.cxx
@@ -57,13 +57,10 @@ static void REGISTRY_CALLTYPE release(RegHandle hReg)
{
ORegistry* pReg = static_cast<ORegistry*>(hReg);
- if (pReg)
+ if (pReg && pReg->release() == 0)
{
- if (pReg->release() == 0)
- {
- delete pReg;
- hReg = nullptr;
- }
+ delete pReg;
+ hReg = nullptr;
}
}