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

coverity#704961 Dereference after null check

Change-Id: I6acca68cbebf149f7ac7f18fa0011e7f3d20a957
üst 6a4eaa43
......@@ -1876,7 +1876,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
break;
}
}
if(!pCharFmt)
if(!pCharFmt && pBasePool)
{
SfxStyleSheetBase* pBase;
......@@ -2026,14 +2026,17 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
sal_Int16 nIdx = GetCommandContextIndex( pSeq[i].Name );
pBasePool->SetSearchMask( SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_ALL );
bool bStyleFound = false;
const SfxStyleSheetBase* pBase = pBasePool->First();
while (pBase && !bStyleFound)
if (pBasePool)
{
if(pBase->GetName() == aStyleName)
bStyleFound = true;
pBase = pBasePool->Next();
pBasePool->SetSearchMask( SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_ALL );
const SfxStyleSheetBase* pBase = pBasePool->First();
while (pBase && !bStyleFound)
{
if(pBase->GetName() == aStyleName)
bStyleFound = true;
pBase = pBasePool->Next();
}
}
if (nIdx == -1 || !bStyleFound)
......
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