summaryrefslogtreecommitdiff
path: root/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx')
-rw-r--r--sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx
index a094f2a21e34..746b512a0478 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx
@@ -80,12 +80,14 @@ void ScPivotLayoutTreeListLabel::KeyInput(const KeyEvent& rKeyEvent)
KeyCode aCode = rKeyEvent.GetKeyCode();
sal_uInt16 nCode = aCode.GetCode();
- switch (nCode)
+ if (nCode == KEY_DELETE)
{
- case KEY_DELETE:
- GetModel()->Remove(GetCurEntry());
- return;
+ const SvTreeListEntry* pEntry = GetCurEntry();
+ if (pEntry)
+ GetModel()->Remove(pEntry);
+ return;
}
+
SvTreeListBox::KeyInput(rKeyEvent);
}