summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-02-09 20:57:45 +0000
committerCaolán McNamara <caolanm@redhat.com>2023-02-10 09:03:02 +0000
commit72959cc2b36749a779b56522f27e290731187043 (patch)
tree6ccc01c08af22d5ad0b65db143bc470640d6ac53
parent86cfb4da4fdca63d92060bcfa65e808f579260f4 (diff)
gtk4: occasional crash at exit
Change-Id: I2008d44f5dae0f22e9213f46a740146d6eb85666 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146727 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 16945ee85dd7..f0923cff2ccd 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -18571,7 +18571,11 @@ public:
virtual ~GtkInstanceDrawingArea() override
{
+#if GTK_CHECK_VERSION(4,0,0)
+ gtk_widget_remove_controller(m_pMouseEventBox, GTK_EVENT_CONTROLLER(m_pZoomGesture));
+#else
g_clear_object(&m_pZoomGesture);
+#endif
ImplGetDefaultWindow()->RemoveEventListener(LINK(this, GtkInstanceDrawingArea, SettingsChangedHdl));