diff options
Diffstat (limited to 'registry/source')
-rw-r--r-- | registry/source/registry.cxx | 9 |
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; } } |