[PATCH] possible null-dereferencing found by cppcheck

Takeshi Abe tabe at fixedpoint.jp
Sun Jan 16 01:40:56 PST 2011


---
 sd/source/ui/func/fusnapln.cxx |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx
index 72356ca..2f8eac7 100644
--- a/sd/source/ui/func/fusnapln.cxx
+++ b/sd/source/ui/func/fusnapln.cxx
@@ -179,11 +179,14 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
             }
         }
     }
+
+    if (pPV) {
     Point aHlpPos;
 
     aHlpPos.X() = ((const SfxUInt32Item&) pArgs->Get(ATTR_SNAPLINE_X)).GetValue();
     aHlpPos.Y() = ((const SfxUInt32Item&) pArgs->Get(ATTR_SNAPLINE_Y)).GetValue();
     pPV->PagePosToLogic(aHlpPos);
+    }
 
     if ( bCreateNew )
     {
-- 
1.7.2.3


----Next_Part(Sun_Jan_16_18_55_48_2011_044)----


More information about the LibreOffice mailing list