coverity#705502 Dereference null return value
Change-Id: I5f41ff8017879a75f088fc0aa1b8ce99f935a46f
This commit is contained in:
@@ -610,15 +610,20 @@ void SwAttrHandler::ActivateTop( SwFont& rFnt, const sal_uInt16 nAttr )
|
||||
const SwTxtAttr* pTopAt = aAttrStack[ nStackPos ].Top();
|
||||
if ( pTopAt )
|
||||
{
|
||||
const SfxPoolItem* pItemNext(NULL);
|
||||
|
||||
// check if top attribute is collection of attributes
|
||||
if ( RES_TXTATR_INETFMT == pTopAt->Which() ||
|
||||
RES_TXTATR_CHARFMT == pTopAt->Which() ||
|
||||
RES_TXTATR_AUTOFMT == pTopAt->Which() )
|
||||
{
|
||||
const SfxItemSet* pSet = CharFmt::GetItemSet( pTopAt->GetAttr() );
|
||||
const SfxPoolItem* pItemNext;
|
||||
pSet->GetItemState( nAttr, RES_TXTATR_AUTOFMT != pTopAt->Which(), &pItemNext );
|
||||
if (pSet)
|
||||
pSet->GetItemState( nAttr, RES_TXTATR_AUTOFMT != pTopAt->Which(), &pItemNext );
|
||||
}
|
||||
|
||||
if (pItemNext)
|
||||
{
|
||||
Color aColor;
|
||||
if ( lcl_ChgHyperLinkColor( *pTopAt, *pItemNext, mpShell, &aColor ) )
|
||||
{
|
||||
|
Reference in New Issue
Block a user