summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-11-06 10:32:15 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-11-06 13:09:32 +0100
commitdcd12b88ecb04766850159043b304cdf965924c1 (patch)
treed70863863aa0a1f5447cffe6e5ea0dcfdb1c0e75
parent51bf5d51405285e0bcac40b16e6cd684e4ae6899 (diff)
set mpCloseButton to null after it is destroyed
Change-Id: If1a0bec30d2bcfdf6846712a67efbe2dcfbbec5c Reviewed-on: https://gerrit.libreoffice.org/82133 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/unx/gtk3/gtk3gtksalmenu.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/gtk3gtksalmenu.cxx b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
index 6602534f5882..301322d8c78d 100644
--- a/vcl/unx/gtk3/gtk3gtksalmenu.cxx
+++ b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
@@ -641,7 +641,10 @@ void GtkSalMenu::ShowCloseButton(bool bShow)
if (!bShow)
{
if (mpCloseButton)
+ {
gtk_widget_destroy(mpCloseButton);
+ mpCloseButton = nullptr;
+ }
return;
}