diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-02-26 16:09:18 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-09 22:23:07 +0100 |
commit | 532dccdc02137540dcecc5b9dd48dfd72947bd48 (patch) | |
tree | e3ba6925d4d1a6900eb6e12f83e26be24aa7f6e7 /svx | |
parent | 7553deec1aee40abd663c3c4d63d9629f69d6c2f (diff) |
vclref: protect vs. double disposes.
Change-Id: I86fe17ad9afba7ee1e87aaa732bebee1746c140f
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/svxruler.cxx | 11 |
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(); } |