Kaydet (Commit) 81870e53 authored tarafından Julien Nabet's avatar Julien Nabet Kaydeden (comit) Norbert Thiebaud

coverity#1000604: Dereference after null check

Change-Id: Id9c3b7eb29c58c55c100db6da644b232ada550ee
Reviewed-on: https://gerrit.libreoffice.org/3791Reviewed-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
Tested-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
üst 3805ee5f
...@@ -283,6 +283,7 @@ sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, ...@@ -283,6 +283,7 @@ sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
SwCntntNode* pTextNd = aTextPos.nNode.GetNode( ).GetCntntNode( ); SwCntntNode* pTextNd = aTextPos.nNode.GetNode( ).GetCntntNode( );
double nTextDistance = 0; double nTextDistance = 0;
bool bValidTextDistance = false; bool bValidTextDistance = false;
bool bConsiderBackground = true;
if ( pTextNd ) if ( pTextNd )
{ {
SwCntntFrm* pTextFrm = pTextNd->getLayoutFrm( getRootFrm( ) ); SwCntntFrm* pTextFrm = pTextNd->getLayoutFrm( getRootFrm( ) );
...@@ -291,9 +292,7 @@ sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, ...@@ -291,9 +292,7 @@ sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
nTextDistance = lcl_getDistance( rTextRect, rPoint ); nTextDistance = lcl_getDistance( rTextRect, rPoint );
bValidTextDistance = true; bValidTextDistance = true;
}
bool bConsiderBackground = true;
// If the text position is a clickable field, then that should have priority. // If the text position is a clickable field, then that should have priority.
if (pTextNd->IsTxtNode()) if (pTextNd->IsTxtNode())
{ {
...@@ -306,6 +305,7 @@ sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint, ...@@ -306,6 +305,7 @@ sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
bConsiderBackground = false; bConsiderBackground = false;
} }
} }
}
double nBackDistance = 0; double nBackDistance = 0;
bool bValidBackDistance = false; bool bValidBackDistance = false;
......
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