From 6ae7061f2f3f6528842e29611053e7aa1c542c0c Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 9 Nov 2015 22:17:18 +0100 Subject: [PATCH] Changed unref -> ref_sink for GTK menus --- src/dorkbox/util/tray/linux/GtkTypeSystemTray.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dorkbox/util/tray/linux/GtkTypeSystemTray.java b/src/dorkbox/util/tray/linux/GtkTypeSystemTray.java index c71ef2c..5da117e 100644 --- a/src/dorkbox/util/tray/linux/GtkTypeSystemTray.java +++ b/src/dorkbox/util/tray/linux/GtkTypeSystemTray.java @@ -57,7 +57,8 @@ class GtkTypeSystemTray extends SystemTray { this.widgets.clear(); // unrefs the children too - libgobject.g_object_unref(this.menu); + // GTK menu needs a "ref_sink" + libgobject.g_object_ref_sink(this.menu); this.menu = null; synchronized (this.menuEntries) {