cid#1500628 Dereference after null check

Change-Id: I6dc6c3fdf1924e0cd012dab1ece0adbb0c405335
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157354
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara 2023-09-28 08:53:17 +01:00
parent a4716c3166
commit 1150a34f0f

View file

@ -52,13 +52,10 @@ SwDBConfig::~SwDBConfig()
void SwDBConfig::Load()
{
const Sequence<OUString>& rNames = GetPropertyNames();
if(!m_pAdrImpl)
{
if (!m_pAdrImpl)
m_pAdrImpl.reset(new SwDBData);
m_pAdrImpl->nCommandType = 0;
if (!m_pBibImpl)
m_pBibImpl.reset(new SwDBData);
m_pBibImpl->nCommandType = 0;
}
Sequence<Any> aValues = GetProperties(rNames);
const Any* pValues = aValues.getConstArray();
OSL_ENSURE(aValues.getLength() == rNames.getLength(), "GetProperties failed");