diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx index 3795601cde5a..6f2425c926dd 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx @@ -59,7 +59,7 @@ void ScPivotLayoutTreeListLabel::FillLabelFields(ScDPLabelDataVector& rLabelVect void ScPivotLayoutTreeListLabel::InsertEntryForSourceTarget(SvTreeListEntry* /*pSource*/, SvTreeListEntry* /*pTarget*/) { - if(mpParent->mpPreviouslyFocusedListBox.get() != this) + if (mpParent->mpPreviouslyFocusedListBox && mpParent->mpPreviouslyFocusedListBox.get() != this) mpParent->mpPreviouslyFocusedListBox->RemoveSelection(); }