Hi, cppcheck said that > [impress/sd/source/ui/func/fusnapln.cxx:186]: (error) Possible null pointer > dereference: pPV which is, at a glance, worth noting. It would be great if someone shows the de-referenceing has no problem, otherwise the attached patch may provides a workaround.
Cheers, -- Takeshi Abe
>From 3a7de459bfa605503f6865a8e23b51b6ad3e2d3c Mon Sep 17 00:00:00 2001 From: Takeshi Abe <t...@fixedpoint.jp> Date: Sun, 16 Jan 2011 18:40:56 +0900 Subject: [PATCH] possible null-dereferencing found by cppcheck --- 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
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice