diff options
author | monsta <[email protected]> | 2018-01-22 16:14:35 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2018-01-22 16:14:35 +0300 |
commit | dfd529dfae32edfb9949e6afb89c2eb631893ea3 (patch) | |
tree | 20abaea39302dc3e3c245c8ba6cfbd74f32a8f5c /applets/notification_area | |
parent | 74c8d775840c806a84784d38560d85ec4d87fc81 (diff) | |
download | mate-panel-dfd529dfae32edfb9949e6afb89c2eb631893ea3.tar.bz2 mate-panel-dfd529dfae32edfb9949e6afb89c2eb631893ea3.tar.xz |
status-notifier: don't crash if tooltip has wrong type
fixes the second issue mentioned in https://github.com/mate-desktop/mate-panel/issues/686
ported from:
https://git.gnome.org/browse/gnome-panel/commit/?id=585c6727a807f0160e79f42a1f17350cc6df0d78
Diffstat (limited to 'applets/notification_area')
-rw-r--r-- | applets/notification_area/status-notifier/sn-item-v0.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/applets/notification_area/status-notifier/sn-item-v0.c b/applets/notification_area/status-notifier/sn-item-v0.c index f8657137..dec9bdf1 100644 --- a/applets/notification_area/status-notifier/sn-item-v0.c +++ b/applets/notification_area/status-notifier/sn-item-v0.c @@ -512,6 +512,14 @@ sn_tooltip_new (GVariant *variant) if (variant == NULL) return NULL; + if (!g_variant_is_of_type (variant, G_VARIANT_TYPE ("(sa(iiay)ss)"))) + { + g_warning ("Type for 'ToolTip' property should be '(sa(iiay)ss)' " + "but got '%s'", g_variant_get_type_string (variant)); + + return NULL; + } + g_variant_get (variant, "(&s@a(iiay)&s&s)", &icon_name, &icon_pixmap, &title, &text); |