summaryrefslogtreecommitdiff
path: root/sfx2/source/view/lokcharthelper.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-09-29 09:15:00 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-09-29 14:14:18 +0200
commitace3634dacfc177a9ad92db8b2d0b596891c1814 (patch)
treef84173db63ebd7c0cb542a58ebda5520cedf1562 /sfx2/source/view/lokcharthelper.cxx
parent86160b081b316532ed83cb9365714a06b1c13326 (diff)
cid#1546831 Dereference after null check
Change-Id: I8c51dd1b312f02534f138b4fe6752ad26f5ac96c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157399 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sfx2/source/view/lokcharthelper.cxx')
-rw-r--r--sfx2/source/view/lokcharthelper.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sfx2/source/view/lokcharthelper.cxx b/sfx2/source/view/lokcharthelper.cxx
index c7941e6aa2ac..f8e8ec47ea4e 100644
--- a/sfx2/source/view/lokcharthelper.cxx
+++ b/sfx2/source/view/lokcharthelper.cxx
@@ -175,7 +175,7 @@ bool LokChartHelper::HitAny(const Point& aPos, bool bNegativeX)
SfxViewShell* pViewShell = SfxViewShell::GetFirst();
while (pViewShell)
{
- if (pViewShell->GetDocId() == pCurView->GetDocId() && pViewShell->getPart() == nPartForCurView)
+ if (pCurView && pViewShell->GetDocId() == pCurView->GetDocId() && pViewShell->getPart() == nPartForCurView)
{
LokChartHelper aChartHelper(pViewShell, bNegativeX);
if (aChartHelper.Hit(aPos))