Kaydet (Commit) f89c7243 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1440844 Uninitialized pointer read

Change-Id: I5ae1c023bfff4f5d45f8ea8104a58dbd89a5d983
Reviewed-on: https://gerrit.libreoffice.org/62852Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 41707751
......@@ -30,12 +30,18 @@ SalLayoutGlyphs::SalLayoutGlyphs()
SalLayoutGlyphs::~SalLayoutGlyphs() { delete m_pImpl; }
SalLayoutGlyphs::SalLayoutGlyphs(const SalLayoutGlyphs& rOther) { operator=(rOther); }
SalLayoutGlyphs::SalLayoutGlyphs(const SalLayoutGlyphs& rOther)
{
m_pImpl = rOther.m_pImpl ? rOther.m_pImpl->clone(*this) : nullptr;
}
SalLayoutGlyphs& SalLayoutGlyphs::operator=(const SalLayoutGlyphs& rOther)
{
delete m_pImpl;
m_pImpl = rOther.m_pImpl ? rOther.m_pImpl->clone(*this) : nullptr;
if (this != &rOther)
{
delete m_pImpl;
m_pImpl = rOther.m_pImpl ? rOther.m_pImpl->clone(*this) : nullptr;
}
return *this;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment