summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/svxruler.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index b02eb034f510..adf08f015683 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -353,11 +353,16 @@ void SvxRuler::dispose()
pBindings->EnterRegistrations();
- for(sal_uInt16 i = 0; i < CTRL_ITEM_COUNT && pCtrlItem[i]; ++i)
- delete pCtrlItem[i];
- delete[] pCtrlItem;
+ if (pCtrlItem)
+ {
+ for(sal_uInt16 i = 0; i < CTRL_ITEM_COUNT && pCtrlItem[i]; ++i)
+ delete pCtrlItem[i];
+ delete[] pCtrlItem;
+ pCtrlItem = NULL;
+ }
pBindings->LeaveRegistrations();
+
Ruler::dispose();
}