aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-10-25 11:08:20 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-10-25 11:08:20 -0500
commitd1c735417327b2914536eecdce06365076e12fe7 (patch)
treea4f7d2df71857de09b0cff277c960745674916fc
parentdd48ee78afe56d2db5fa22de62a4808eb5fc8276 (diff)
downloadayatana-indicator-sound-d1c735417327b2914536eecdce06365076e12fe7.tar.gz
ayatana-indicator-sound-d1c735417327b2914536eecdce06365076e12fe7.tar.bz2
ayatana-indicator-sound-d1c735417327b2914536eecdce06365076e12fe7.zip
test that player.icon isn't null before we serialize it.
-rw-r--r--src/sound-menu.vala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sound-menu.vala b/src/sound-menu.vala
index e1c5c1f..af808b5 100644
--- a/src/sound-menu.vala
+++ b/src/sound-menu.vala
@@ -144,7 +144,8 @@ class SoundMenu: Object
var player_item = new MenuItem (player.name, "indicator." + player.id);
player_item.set_attribute ("x-canonical-type", "s", "com.canonical.unity.media-player");
- player_item.set_attribute_value ("icon", g_icon_serialize (player.icon));
+ if (player.icon != null)
+ player_item.set_attribute_value ("icon", g_icon_serialize (player.icon));
section.append_item (player_item);
var playback_item = new MenuItem (null, null);