diff options
author | kotontrion <[email protected]> | 2025-02-17 09:52:03 +0100 |
---|---|---|
committer | kotontrion <[email protected]> | 2025-02-17 09:52:03 +0100 |
commit | 32084b0e06e21a510d080e3e699416153b215026 (patch) | |
tree | 91f72e68412e50fda6045d49bc393cf161bed4c8 /lib | |
parent | 956b74fd9ff8c607b6683b404860c4e6b30ffe2b (diff) |
tray: add small check
to prevent segfault when tray app does not follow the spec correctly.
There probably should be more though.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tray/trayItem.vala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/tray/trayItem.vala b/lib/tray/trayItem.vala index f753cd0..cd13f8b 100644 --- a/lib/tray/trayItem.vala +++ b/lib/tray/trayItem.vala @@ -217,7 +217,8 @@ public class TrayItem : Object { } }); - if (proxy.Menu != null) { + Variant? menuVariant = proxy.get_cached_property("Menu"); + if (proxy.Menu != null && menuVariant != null && menuVariant.is_of_type(VariantType.SIGNATURE)) { this.menu_importer = new DBusMenu.Importer(proxy.get_name_owner(), proxy.Menu); this.menu_importer.notify["model"].connect(() => { notify_property("menu-model"); |