diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2011-01-17 12:08:54 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-01-17 12:08:54 +0000 |
commit | e871fd664e046f766680440d5c5ff9e2ea99e3f9 (patch) | |
tree | 3abe3c4da41dd1d10914cdb3408049b388a19c4a /sd | |
parent | 89be1d54841d3c0a216292af9cc04a1ce019ae8c (diff) |
cppcheck: possible NULL pPV
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/func/fusnapln.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx index dbd29cf755af..228467ca0994 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) |