summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-12-13 11:50:41 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-12-13 15:10:36 +0100
commita32059cfd1fa12eeb93b1ed3079ded0ce42deef6 (patch)
treec1619facad276f9944919cd048a57f6fc85870cc /vcl
parent0fa14d58457e9418ff756a0efd66e365c4403a67 (diff)
Resolves: tdf#122016 crash accessing deleted GtkSalMenu
Change-Id: Ib6527e17110b55251fea9f0701d0e02f6fa5a9fe Reviewed-on: https://gerrit.libreoffice.org/65092 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk/gtksalmenu.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx
index e504e5d7aef0..f9053ce23f6f 100644
--- a/vcl/unx/gtk/gtksalmenu.cxx
+++ b/vcl/unx/gtk/gtksalmenu.cxx
@@ -506,6 +506,8 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangl
g_object_unref(mpActionGroup);
ClearActionGroupAndMenuModel();
+ mpFrame = nullptr;
+
return true;
#else
(void)pWin;
@@ -581,6 +583,9 @@ GtkSalMenu::~GtkSalMenu()
g_object_unref(mpMenuModel);
maItems.clear();
+
+ if (mpFrame)
+ mpFrame->SetMenu(nullptr);
}
bool GtkSalMenu::VisibleMenuBar()