From: Akihiko Odaki <[email protected]>

The implementation of the gtk-menu-bar-accel property had a bug that
leaks memory when the set value is an empty string, which was fixed
with:
https://gitlab.gnome.org/GNOME/gtk/-/commit/44bf10c4a2a0463891884a105fa27cf36b73f119

To work around the issue for old GTK versions, replace the empty string
with NULL, which has the same meaning for the property.

Message-ID: <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Signed-off-by: Akihiko Odaki <[email protected]>
---
 ui/gtk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/gtk.c b/ui/gtk.c
index c615d35451b6..ae28f1fbb89b 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -2645,7 +2645,7 @@ static void gd_create_menus(GtkDisplayState *s, 
DisplayOptions *opts)
 
     /* Disable the default "F10" menu shortcut. */
     settings = gtk_widget_get_settings(s->window);
-    g_object_set(G_OBJECT(settings), "gtk-menu-bar-accel", "", NULL);
+    g_object_set(G_OBJECT(settings), "gtk-menu-bar-accel", NULL, NULL);
 }
 
 

-- 
2.55.0.543.g5ebe2ebe4ea8


Reply via email to