diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-13 11:03:29 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-13 14:03:25 +0000 |
commit | 53a46e24cded1b92c9af337f392dc531b1422f10 (patch) | |
tree | 700e391b42e03d98ac688409c7f542bba22bb3c1 | |
parent | 89cf8bd7c6b1cba158d5d103b1599ac34f95e423 (diff) |
coverity#705503 Dereference null return value
Change-Id: I6d21ba4de5ab61f9141abf9de5da843a7ad5ed76
-rw-r--r-- | sw/source/core/text/porfld.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 0277a0aea067..df502eb6e98a 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -794,14 +794,22 @@ SwGrfNumPortion::SwGrfNumPortion( SwGrfNumPortion::~SwGrfNumPortion() { if ( IsAnimated() ) - ( (Graphic*) pBrush->GetGraphic() )->StopAnimation( 0, nId ); + { + Graphic* pGraph = ( (Graphic*) pBrush->GetGraphic() ); + if (pGraph) + pGraph->StopAnimation( 0, nId ); + } delete pBrush; } void SwGrfNumPortion::StopAnimation( OutputDevice* pOut ) { if ( IsAnimated() ) - ( (Graphic*) pBrush->GetGraphic() )->StopAnimation( pOut, nId ); + { + Graphic* pGraph = ( (Graphic*) pBrush->GetGraphic() ); + if (pGraph) + pGraph->StopAnimation( pOut, nId ); + } } bool SwGrfNumPortion::Format( SwTxtFormatInfo &rInf ) |