[Libreoffice-commits] .: sd/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Jan 17 04:09:05 PST 2011


 sd/source/ui/func/fusnapln.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d2c46a9589519eef2efaf94b8f7aebb88a571766
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Mon Jan 17 12:08:54 2011 +0000

    cppcheck: possible NULL pPV

diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx
index 72356ca..d544ec3 100644
--- a/sd/source/ui/func/fusnapln.cxx
+++ b/sd/source/ui/func/fusnapln.cxx
@@ -74,7 +74,6 @@ FunctionReference FuSnapLine::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::
 void FuSnapLine::DoExecute( SfxRequest& rReq )
 {
     const SfxItemSet* pArgs = rReq.GetArgs();
-    SdrPageView* pPV = 0;
     USHORT	nHelpLine = 0;
     BOOL	bCreateNew = TRUE;
 
@@ -87,11 +86,12 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
         pArgs = NULL;
     }
     
+    SdrPageView* pPV = mpView->GetSdrPageView();
+
     if ( !pArgs )
     {
         SfxItemSet aNewAttr(mpViewShell->GetPool(), ATTR_SNAPLINE_START, ATTR_SNAPLINE_END);
         bool bLineExist (false);
-        pPV = mpView->GetSdrPageView();
         Point aLinePos;
         
         if (pHelpLineIndex == NULL)


More information about the Libreoffice-commits mailing list