Kaydet (Commit) a32059cf authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: tdf#122016 crash accessing deleted GtkSalMenu

Change-Id: Ib6527e17110b55251fea9f0701d0e02f6fa5a9fe
Reviewed-on: https://gerrit.libreoffice.org/65092
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 0fa14d58
...@@ -506,6 +506,8 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangl ...@@ -506,6 +506,8 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangl
g_object_unref(mpActionGroup); g_object_unref(mpActionGroup);
ClearActionGroupAndMenuModel(); ClearActionGroupAndMenuModel();
mpFrame = nullptr;
return true; return true;
#else #else
(void)pWin; (void)pWin;
...@@ -581,6 +583,9 @@ GtkSalMenu::~GtkSalMenu() ...@@ -581,6 +583,9 @@ GtkSalMenu::~GtkSalMenu()
g_object_unref(mpMenuModel); g_object_unref(mpMenuModel);
maItems.clear(); maItems.clear();
if (mpFrame)
mpFrame->SetMenu(nullptr);
} }
bool GtkSalMenu::VisibleMenuBar() bool GtkSalMenu::VisibleMenuBar()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment