[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Sun May 28 20:04:36 UTC 2017


 sw/source/core/unocore/unodraw.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 77a58dbde8d282e42819110b14526983f1424308
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun May 28 20:50:51 2017 +0100

    coverity#1406097 Dereference null return value
    
    Change-Id: I6e6c3a87f571274b4bbd09adc1daaa07289240db

diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 63d50325deed..81e9831d1125 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1142,9 +1142,10 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
                                 SwTextAttr * const pHint =
                                     pTextNode->GetTextAttrForCharAt(
                                         nIdx, RES_TXTATR_FLYCNT );
-                                SAL_WARN_IF( !pHint || pHint->Which() != RES_TXTATR_FLYCNT,
+                                assert(pHint && "Missing Hint.");
+                                SAL_WARN_IF( pHint->Which() != RES_TXTATR_FLYCNT,
                                             "sw.uno", "Missing FlyInCnt-Hint." );
-                                SAL_WARN_IF( !pHint || pHint->GetFlyCnt().GetFrameFormat() != pFormat,
+                                SAL_WARN_IF( pHint->GetFlyCnt().GetFrameFormat() != pFormat,
                                             "sw.uno", "Wrong TextFlyCnt-Hint." );
                                 const_cast<SwFormatFlyCnt&>(pHint->GetFlyCnt())
                                     .SetFlyFormat();


More information about the Libreoffice-commits mailing list