| commit | 0349ef0fd8d85730e4b2b9f419868b2cef50868c | [log] |
|---|---|---|
| author | Caolán McNamara <caolanm@redhat.com> | Wed Feb 10 12:47:01 2021 +0000 |
| committer | Caolán McNamara <caolanm@redhat.com> | Wed Feb 10 15:47:08 2021 +0100 |
| tree | c02f078f197b7eed495085ca1182eb72671c0af1 | |
| parent | 97a2416f90a0eec6eab0e939502450499bd3f383 [diff] |
Related: tdf#140225 when clearing pItemList, keep SalMenu in sync with their removal during menu teardown Change-Id: Ic5555372112c5717cbc39c38c6172344e807deb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110703 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 3cffab6..aa7afb0 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx
@@ -213,7 +213,18 @@ void Menu::dispose() bKilled = true; pItemList->Clear(); // tdf#140225 when clearing pItemList, keep SalMenu in sync with // their removal during menu teardown for (size_t n = pItemList->size(); n;) { --n; if (mpSalMenu) mpSalMenu->RemoveItem(n); pItemList->Remove(n); } assert(!pItemList->size()); mpLayoutData.reset(); // Native-support: destroy SalMenu